<jupyter_start><jupyter_text>---title: "Enumerate A List"author: "<NAME>"date: 2017-12-20T11:53:49-07:00description: "Enumerate a list in Python"type: technical_notedraft: false---<jupyter_code># Create a list of strings
data = ['One','Two','Three','Four','Five']
# For each item in the enumerated variable, data
for item in enumerate(data):
    # Print the whole enumerated element
    print(item)
    # Print only the value (not the index number)
    print(item[1])<jupyter_output>(0, 'One')
One
(1, 'Two')
Two
(2, 'Three')
Three
(3, 'Four')
Four
(4, 'Five')
Five
{'fraction_non_alphanumeric': 0.16283185840707964, 'fraction_numerical': 0.04247787610619469, 'mean_word_length': 5.288888888888889, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '422011', 'license': 'CC0-1.0', 'n_tokens_mistral': 220, 'n_tokens_neox': 199, 'n_words': 61, 'path': 'docs/python/data_wrangling/enumerate_a_list.ipynb', 'repo_name': 'revgizmo-forks/ds_notes', 'size': '570'}