Код: Выделить всё
>>> for i in range(10):
print(i)
0
1
2
3
4
5
6
7
8
9
>>> for i in iter(range(10)):
print(i)
0
1
2
3
4
5
6
7
8
9
>>>
Подробнее здесь: https://stackoverflow.com/questions/512 ... n-for-loop
Код: Выделить всё
>>> for i in range(10):
print(i)
0
1
2
3
4
5
6
7
8
9
>>> for i in iter(range(10)):
print(i)
0
1
2
3
4
5
6
7
8
9
>>>