EasyOutput prediction

Filtering with if

What does this code print?

nums = [1, 2, 3, 4, 5, 6]
evens = [x for x in nums if x % 2 == 0]
print(evens)

← → arrow keys to navigate

Sign in to save your progress.

Filtering with if - Python Comprehensions Quiz | Unnested