Enumerate

Python / Data Science

lst = ['First','Second','Third','Fourth','Fifth']       # ['First', 'Second', 'Third', 'Fourth', 'Fifth']

# for each in enumerated list
for item in enumerate(lst):
    item

# (0, 'First')
# (1, 'Second')
# (2, 'Third')
# (3, 'Fourth')
# (4, 'Fifth')

'''
Michael Sjoeberg
2018-11-05
https://github.com/michaelsjoeberg/python-playground/blob/master/data-science/enumerate.py
'''