Skip to content

Commit 96085c1

Browse files
committed
reverse reverse.
1 parent c8542d3 commit 96085c1

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

python/02-lists.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,18 @@
112112

113113
print(data)
114114

115+
116+
########## REVERSED ITERATOR ##########
117+
118+
119+
data = ["a", "b", "c", "d", "e", "f", "g", "h"]
120+
121+
data_reversed = []
122+
123+
for item in reversed(data):
124+
data_reversed.append(item)
125+
126+
print(data)
127+
print(data_reversed)
128+
129+

0 commit comments

Comments
 (0)