Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python-for-loop/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Python for Loops: The Pythonic Way

This folder provides the code examples for the Real Python tutorial [Python for Loops: The Pythonic Way](https://realpython.com/python-for-loop-update/).
This folder provides the code examples for the Real Python tutorial [Python for Loops: The Pythonic Way](https://realpython.com/python-for-loop/).
8 changes: 8 additions & 0 deletions python-for-loop/chained_lists.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from itertools import chain

first = [7, 6, 1]
second = [4, 1]
third = [8, 0, 6]

for value in chain(first, second, third):
print(value**2)
4 changes: 2 additions & 2 deletions python-for-loop/dictionaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
for team in teams.values():
print(team)

for city, team in teams.items():
print(city, "->", team)
for place, team in teams.items():
print(place, "->", team)