Answers for "start loop from specific index python"

27

python3 iterate through indexes

items=['baseball','basketball','football']
for index, item in enumerate(items):
    print(index, item)
Posted by: Guest on May-07-2020
0

for in list start with index python

for item in some_list[2:]:
    # do stuff

#This will start at the third element and iterate to the end.
Posted by: Guest on December-08-2020

Code answers related to "start loop from specific index python"

Python Answers by Framework

Browse Popular Code Answers by Language