The list is looped using steps, but the value of n increases by 1 instead of step when enumerate and use.
Does enumerate not support steps?
a = range(0, 20)
for n, i in enumerate(a[::5]):
print(n)
>> 0
1
2
3
# Desired Value
>> 0
4
9
13
Enumerate itself means "numbering." You can specify the starting number, but there are no steps.
© 2024 OneMinuteCode. All rights reserved.