1. What is list comprehension ? Junior 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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account
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 Reveal the answer + AI explanation — free account