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 286286 "cell_type" : " markdown" ,
287287 "metadata" : {},
288288 "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: "
290290 ]
291291 },
292292 {
293293 "cell_type" : " code" ,
294294 "collapsed" : false ,
295295 "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])"
297299 ],
298300 "language" : " python" ,
299301 "metadata" : {},
You can’t perform that action at this time.
0 commit comments