<jupyter_start><jupyter_text>https://www.programiz.com/python-programming/methods/built-in/enumerate ENUMERATE()enumerate(iterable, start=0)enumerate() Parametersenumerate() method takes two parameters:* iterable - a sequence, an iterator, or objects that supports iteration* start (optional) - enumerate() starts counting from this number. If start is omitted, 0 is taken as start.Return Value from enumerate()enumerate() method adds counter to an iterable and returns it. The returned object is a enumerate object.You can convert enumerate objects to list and tuple using list() and tuple() method respectively.<jupyter_code>grocery = ['bread', 'milk', 'butter']
enumerateGrocery = enumerate(grocery)

print(type(enumerateGrocery))

# converting to list
print(list(enumerateGrocery))

# changing the default counter
enumerateGrocery = enumerate(grocery, 10)
print(list(enumerateGrocery))
grocery = ['bread', 'milk', 'butter']

for item in enumerate(grocery):
  print(item)

print('\n')
for count, item in enumerate(grocery):
  print(count, item)

print('\n')
# changing default start value
for count, item in enumerate(grocery, 100):
  print(count, item)<jupyter_output>(0, 'bread')
(1, 'milk')
(2, 'butter')


0 bread
1 milk
2 butter


100 bread
101 milk
102 butter
{'fraction_non_alphanumeric': 0.11277602523659307, 'fraction_numerical': 0.017350157728706624, 'mean_word_length': 6.169491525423729, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, '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': '370808', 'license': 'MIT', 'n_tokens_mistral': 403, 'n_tokens_neox': 375, 'n_words': 133, 'path': 'Python_GFG_Solutions/find_the_equilibrium_index_of_an_array.ipynb', 'repo_name': 'avs-abhishek123/Python_folder', 'size': '1268'}