What will the following code print out? l = [i for i in range(10) if i % 2 == 0]
print(l)
Explanation
Code will generate a list with even numbers that are less than 10

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Python quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes