EXAM QUESTIONS AND CORRECT ANSWERS
(VERIFIED ANSWERS) PLUS RATIONALES
Q$A 2026 |INSTANT DOWNLOAD PDF
1. What is an iterable in Python?
A. An object that supports indexing only
B. An object capable of returning its elements one at a time
C. A function that loops automatically
D. A class that stores integers only
Rationale: Iterables can return elements one at a time using iteration protocols.
Correct answer: B
2. Which of the following is an iterable?
A. int
B. float
C. list
D. bool
Rationale: Lists are iterable collections.
Correct answer: C
,3. What keyword is used to iterate over an iterable?
A. loop
B. repeat
C. for
D. iterate
Rationale: Python uses for loops for iteration.
Correct answer: C
4. Which method returns an iterator from an iterable?
A. next()
B. iter()
C. next()
D. iterate()
Rationale: iter() returns an iterator object.
Correct answer: B
5. What does an iterator do?
A. Stores data permanently
B. Converts integers to strings
C. Produces values one at a time
D. Sorts a list automatically
,Rationale: Iterators yield items sequentially.
Correct answer: C
6. Which method retrieves the next item in an iterator?
A. next()
B. next()
C. iterate()
D. get_next()
Rationale: next() returns next value.
Correct answer: B
7. Which of these is NOT iterable?
A. tuple
B. dictionary
C. integer
D. set
Rationale: Integers cannot be iterated.
Correct answer: C
, 8. What happens when an iterator is exhausted?
A. It restarts automatically
B. It raises StopIteration
C. It deletes itself
D. It returns None forever
Rationale: Iterators stop with StopIteration.
Correct answer: B
9. Which structure is immutable?
A. list
B. set
C. tuple
D. dictionary
Rationale: Tuples cannot be modified.
Correct answer: C
10. Which is true about lists?
A. They are immutable
B. They are unordered
C. They are iterable
D. They cannot store multiple types