Skip to content

Commit 86b4f80

Browse files
committed
exaples with range
1 parent 89de42b commit 86b4f80

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

example_2.py

+9
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,12 @@ def magic_fn():
100100
# print(x[False])
101101

102102
print(x_10[Magic()])
103+
104+
# TODO we can use * to unpack any Sequence (list, tuple, str ...)
105+
print(*range(0, 10))
106+
print(*range(10))
107+
print(*range(2, 11))
108+
print(*range(2, 11, 3))
109+
print(*range(10, 1, -1))
110+
print([x / 10 for x in range(0, 11, 1) ])
111+

0 commit comments

Comments
 (0)