Python знает количество петли
a_list = ["a", "b", "c", "d"]
for iteration, item in enumerate(a_list):
print(iteration)
Motionless Moose
a_list = ["a", "b", "c", "d"]
for iteration, item in enumerate(a_list):
print(iteration)