The enumerate() Function with Starting Index in Python


Use enumerate() and specify a starting index.

Source Code

for i, letter in enumerate(['a', 'b', 'c'], start=1):
    print(f"{i}: {letter}")
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments