(Hackerrank) HackerRank Python Certification Practice Test
Hackerrank Comprehensions (List, Dict, Set, and Generator Expressions)
What does the following list comprehension produce?
python
[x**2 for x in range(5) if x % 2 == 0]
Select your answer
A
[0, 4, 16]
B
[0, 1, 4, 9, 16]
C
[4, 16]
D
[0, 4, 8, 16]
Hint
✨ Remove Ads & Unlock Every Exam
— From $1.49