Which loop is used to iterate over a sequence in Python?
-
A
while
-
B
for
Correct answer
-
C
do-while
-
D
repeat
15 views
Explanation
The for loop iterates over elements of a sequence. Source: Standard Python content (FBISE-aligned).
Reference
Asked in: Matric,FBISE
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ