Help
Contact
For teachers and institutes
Search courses, problems, tests…
A
A
>_
StemPy Lab
Courses ▾
Problems ▾
Practice ▾
Mock Tests
Classes
Groups
Community ▾
A
A
What does print([n for n in range(6) if n % 3 == 0]) show? | StemPy Lab
Quizzes
/
What does print([n for n in range(6) if n % 3 == 0]) show?
Python Programming
Easy
High School (11–12)
High School (9–10)
Undergraduate
General
Python Going Further › Comprehensions, Iterators and Generators
Created by
StemPy Lab
What does print([n for n in range(6) if n % 3 == 0]) show?
[3]
[0, 3]
[0, 3, 6]
[0, 1, 2]
Check Answer
Log in to save
Tag someone
⚑ Report
← All Quizzes
← What does print([n + 1 for n in [1, 2, 3]]) show?
What does print({n % 3 for n in range(6)}) show, as a sorted list? →
More on
Python Going Further › Comprehensions, Iterators and Generators
Discussion (0)
Log in
to join the discussion.
Loading…
Problems on this topic
Write an endless generator primes() that gives 2, 3, 5, 7, 11,...
Hard
Write an endless generator squares() that gives 1, 4, 9, 16,...
Medium
Follow the generator
Medium
Used up
Medium
All problems on this topic →