Practice: Reading List Comprehensions
Contents
Practice: Reading List Comprehensions#
Question 0#
What is the result of the following code block? You should not run the code cell, but instead, simulate the result with a pencil and paper.
words = ['I', 'saw', 'a', 'dog', 'today']
new_words = [word[1] for word in words if len(word) >= 2]
Your Task
Select one option. Write your answer down in your own space.
Option 0
['s', 'd', 't']
Option 1
['a', 'o', 'o']
Option 2
[]
Option 3
Causes some Error
Option 4
Other