Concept
The for Loop
Python's `for` loop grabs items directly out of any list or collection:
python
games = ["Zelda", "Mario", "Doom"]
for game in games:
print(f"Playing {game}")
# 58. The for Loop Python's `for` loop grabs items directly out of any list or collection: ```python games = ["Zelda", "Mario", "Doom"] for game in games: print(f"Playing {game}") ``` No index counting. No `i = 0`. It just visits every item one by one from first to last.
Checkpoint
Why do Python developers love `for item in items:`?
Practice
Loop over `scores = [10, 20, 30]`. In each turn, print `"Score:"` and double the score (`score * 2`).
01
Tap code blocks below to assemble
Available Blocks