Answers for "start index from 1 in python"

1

start index from 1 in python

days = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]
for index,day in enumerate(days):
    #this will convert index starting from 0 to 1
    if index >= 0: index += 1
    print(index, day)
Posted by: Guest on October-03-2021

Code answers related to "start index from 1 in python"

Python Answers by Framework

Browse Popular Code Answers by Language