Skip to content

Commit 249425f

Browse files
committed
Put itertools import to the top
1 parent 5d1e009 commit 249425f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
from itertools import pairwise
2+
3+
# Advanced Iteration Patterns
4+
5+
cities = ["Graz", "Belgrade", "Warsaw", "Berlin"]
6+
7+
for city, next_city in pairwise(cities):
8+
print(f"{city} -> {next_city}")
9+
110
# Slicing
211

312
game_name = "Stardew Valley"
@@ -10,12 +19,3 @@
1019

1120
for pet, owner in zip(pets, owners):
1221
print(f"{pet} & {owner}")
13-
14-
# Advanced Iteration Patterns
15-
16-
from itertools import pairwise
17-
18-
cities = ["Graz", "Belgrade", "Warsaw", "Berlin"]
19-
20-
for city, next_city in pairwise(cities):
21-
print(f"{city} -> {next_city}")

0 commit comments

Comments
 (0)