0

Please how can I call a number out from a range in such way like to use it for a loop

range

4th Dec 2017, 4:44 PM
Faith Ariyo
Faith Ariyo - avatar
2 ответов
+ 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 😊
4th Dec 2017, 10:53 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
0
Pardon me?
4th Dec 2017, 5:09 PM
Marcus Søndergaard
Marcus Søndergaard - avatar