seasons = ['Spring', 'Summer', 'Fall', 'Winter'] print(list(enumerate(seasons))) for i,value in enumerate(seasons): print(i,value) 輸出結果: [(0, 'Spring'), (1, 'Summer'), (2, 'Fall'), (3, 'Winter')] 0 Spring 1 Summer 2 Fall 3 Winter