📜  python代码示例中从1开始索引

📅  最后修改于: 2022-03-11 14:45:33.039000             🧑  作者: Mango

代码示例1
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)