File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 286
286
"cell_type" : " markdown" ,
287
287
"metadata" : {},
288
288
"source" : [
289
- " Let's translate each word and save them in the list called translated_words. We'll generate this list by using a list comprehension. "
289
+ " Let's translate each word and save them in the list called translated_words. Let's start with an empty list and use a for loop to populate our list: "
290
290
]
291
291
},
292
292
{
293
293
"cell_type" : " code" ,
294
294
"collapsed" : false ,
295
295
"input" : [
296
- " translated_words = [print(words[spanish_word]) for spanish_word in sentence_words]"
296
+ " translated_words = []\n " ,
297
+ " for spanish_word in sentence_words:\n " ,
298
+ " translated_words.append(words[spanish_word])"
297
299
],
298
300
"language" : " python" ,
299
301
"metadata" : {},
You can’t perform that action at this time.
0 commit comments