PRACTICE / UNDERSTAND / REPEAT
Python practice question
Practice control flow with self-contained questions. Check your answer, then use the explanation to understand the reasoning.
1 questionAnswers explainedFree · no login
Try this question
Complete the loop so it visits each item in `names`.
for name ___ names:
print(name)
Answer & explanation
Answer: in
`for name in names` iterates over the elements of the list.