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 + 1 for n in [1, 2, 3]]) show? | StemPy Lab
Quizzes
/
What does print([n + 1 for n in [1, 2, 3]]) 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 + 1 for n in [1, 2, 3]]) show?
[2, 3, 4]
[3, 4, 5]
[1, 2, 3]
An error
Check Answer
Log in to save
Tag someone
⚑ Report
← All Quizzes
← A student writes a set of tags to a file with json.dump({"tags": {"a", "b"}}, f). What happens?
What does print([n for n in range(6) if n % 3 == 0]) show? →
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 →