0
Please how can I call a number out from a range in such way like to use it for a loop
range
2 odpowiedzi
+ 3
Range is a generator and so it is iterable. So you just call it by index.
If you have:
a=range(1,12,2)
a[0] equals 1, a[1] equals 3 and so on.
print(a[5]) will output..?
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
11
😊
0
Pardon me?