Skip to content

Commit

Permalink
Final QA
Browse files Browse the repository at this point in the history
  • Loading branch information
gahjelle committed Feb 2, 2025
1 parent c628fcb commit ca77718
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
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)

0 comments on commit ca77718

Please sign in to comment.