How to get the index for items in a 'for' loop

a_list = ["icecream","lemon cake","chocolate cake"]

for index, value in enumerate(a_list):
    print(index, index)
SNAPPED!

SNAPPED!

Comments

Popular posts from this blog

Append to a json file python

Setup Mailhog mail server on Ubuntu