Python | List Comprehension Quiz | Question 3

Last Updated :
Discuss
Comments

What will the following list comprehension output?

squares = [x**2 for x in range(5)]
 

[0, 1, 4, 9, 16]

[1, 4, 9, 16, 25]

 [0, 2, 4, 6, 8]

[1, 3, 5, 7, 9]

Share your thoughts in the comments