enumerate
my_list = ['apple', 'banana', 'grapes', 'pear'] for c, value in enumerate(my_list, 1): print(c, value) # Output: # 1 apple # 2 banana # 3 grapes # 4 pear