Код: Выделить всё
for i in range(len(array)):
do_something(array[i])
Код: Выделить всё
for i in array:
do_something(i)
Код: Выделить всё
for i, j in range(len(array)):
# What is i and j here?
Код: Выделить всё
for i, j in array:
# What is i and j in this case?
Подробнее здесь: https://stackoverflow.com/questions/519 ... -in-python
Мобильная версия