Question

What does the following list comprehension produce? result = [x**2 for x in range(5) if x % 2 == 0] print(result)

A [0, 1, 4, 9, 16]
B [0, 4, 16]
C [1, 9]
D [4, 16]
E Error
Practice Next

Hey! Ask a query