Advertisement
Guest User

Untitled

a guest
May 25th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. colors = ['red', 'green', 'blue', 'orange', 'purple']
  2.  
  3. # set start index to 1 (default is 0)
  4. for index, color in enumerate(colors, start = 1):
  5. print(f'{index} ---> {color}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement