15 Comprehensions & Iterators questions from the Python bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.
Free to start: the 2-minute IT readiness check — six questions and a result.
A.an object that can return a fresh iterator via __iter__, such as a list or string
B.a bracketed expression that builds a new list eagerly by iterating over a source
C.a brace-delimited expression of the form key:value that builds a mapping from an iterable
D.a parenthesized comprehension that yields items lazily one at a time without building the whole sequence in memory
Answer + AI explanation with Pro
2. Which term means: "a bracketed expression that builds a new list eagerly by iterating over a source"?
Junior
A.generator expression
B.list comprehension
C.iterator
D.dict comprehension
Answer + AI explanation with Pro
3. Which statement is correct?
Junior
A.list comprehension — an object that can return a fresh iterator via __iter__, such as a list or string
B.list comprehension — a bracketed expression that builds a new list eagerly by iterating over a source
C.list comprehension — a parenthesized comprehension that yields items lazily one at a time without building the whole sequence in memory
D.list comprehension — an object implementing __next__ that produces successive values and raises StopIteration when exhausted
Answer + AI explanation with Pro
4. What is generator expression?
Mid
A.a brace-delimited expression of the form key:value that builds a mapping from an iterable
B.a parenthesized comprehension that yields items lazily one at a time without building the whole sequence in memory
C.an object implementing __next__ that produces successive values and raises StopIteration when exhausted
D.an object that can return a fresh iterator via __iter__, such as a list or string
Answer + AI explanation with Pro
5. Which term means: "a parenthesized comprehension that yields items lazily one at a time without building the whole sequence in memory"?
Mid
A.generator expression
B.iterator
C.iterable
D.list comprehension
Answer + AI explanation with Pro
6. Which statement is correct?
Mid
A.generator expression — a parenthesized comprehension that yields items lazily one at a time without building the whole sequence in memory
B.generator expression — an object implementing __next__ that produces successive values and raises StopIteration when exhausted
C.generator expression — a bracketed expression that builds a new list eagerly by iterating over a source
D.generator expression — an object that can return a fresh iterator via __iter__, such as a list or string
Answer + AI explanation with Pro
7. What is dict comprehension?
Junior
A.an object implementing __next__ that produces successive values and raises StopIteration when exhausted
B.a brace-delimited expression of the form key:value that builds a mapping from an iterable
C.a parenthesized comprehension that yields items lazily one at a time without building the whole sequence in memory
D.a bracketed expression that builds a new list eagerly by iterating over a source
Answer + AI explanation with Pro
8. Which term means: "a brace-delimited expression of the form key:value that builds a mapping from an iterable"?
Junior
A.generator expression
B.iterator
C.list comprehension
D.dict comprehension
Answer + AI explanation with Pro
9. Which statement is correct?
Junior
A.dict comprehension — a bracketed expression that builds a new list eagerly by iterating over a source
B.dict comprehension — an object implementing __next__ that produces successive values and raises StopIteration when exhausted
C.dict comprehension — a brace-delimited expression of the form key:value that builds a mapping from an iterable
D.dict comprehension — a parenthesized comprehension that yields items lazily one at a time without building the whole sequence in memory
Answer + AI explanation with Pro
10. What is iterator?
Mid
A.an object that can return a fresh iterator via __iter__, such as a list or string
B.a bracketed expression that builds a new list eagerly by iterating over a source
C.an object implementing __next__ that produces successive values and raises StopIteration when exhausted
D.a parenthesized comprehension that yields items lazily one at a time without building the whole sequence in memory
Answer + AI explanation with Pro
11. Which term means: "an object implementing __next__ that produces successive values and raises StopIteration when exhausted"?
Mid
A.iterator
B.generator expression
C.list comprehension
D.dict comprehension
Answer + AI explanation with Pro
12. Which statement is correct?
Mid
A.iterator — an object that can return a fresh iterator via __iter__, such as a list or string
B.iterator — an object implementing __next__ that produces successive values and raises StopIteration when exhausted
C.iterator — a parenthesized comprehension that yields items lazily one at a time without building the whole sequence in memory
D.iterator — a brace-delimited expression of the form key:value that builds a mapping from an iterable
Answer + AI explanation with Pro
13. What is iterable?
Mid
A.a bracketed expression that builds a new list eagerly by iterating over a source
B.a parenthesized comprehension that yields items lazily one at a time without building the whole sequence in memory
C.an object that can return a fresh iterator via __iter__, such as a list or string
D.a brace-delimited expression of the form key:value that builds a mapping from an iterable
Answer + AI explanation with Pro
14. Which term means: "an object that can return a fresh iterator via __iter__, such as a list or string"?
Mid
A.iterator
B.iterable
C.generator expression
D.dict comprehension
Answer + AI explanation with Pro
15. Which statement is correct?
Mid
A.iterable — a bracketed expression that builds a new list eagerly by iterating over a source
B.iterable — an object implementing __next__ that produces successive values and raises StopIteration when exhausted
C.iterable — an object that can return a fresh iterator via __iter__, such as a list or string
D.iterable — a brace-delimited expression of the form key:value that builds a mapping from an iterable
Answer + AI explanation with Pro
Free to start
Start with a free readiness check
Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Comprehensions & Iterators question come with Pro.