🌐
GeeksforGeeks
geeksforgeeks.org › python › enumerate-in-python
Enumerate() in Python - GeeksforGeeks
Explanation: list(enumerate(a)) converts index-element pairs into a list of tuples. Example 2: This code retrieves elements one by one using next() on enumerate object.
Published: May 8, 2026
🌐
Python Basics
pythonbasics.org › home › python basics › enumerate explained (with examples)
Enumerate Explained (With Examples) - pythonbasics.org
... # create a sequence browsers = ['Chrome','Firefox','Opera','Vivaldi'] # create an enumeratable and convert to list x = list(enumerate(browsers)) print(x) ... browsers = ['Chrome','Firefox','Opera','Vivaldi'] eObj = enumerate(browsers) x = next(eObj) print(x) x = next(eObj) print(x) Let's ...
Discussions

[deleted by user]
Thanks for the tutorial! More on reddit.com
🌐 r/learnpython
26
171
March 2, 2022
What's the difference between using in vs. in enumerate() with for loops?
enumerate is a built in function that will return the index of the items in the list as you iterate over the list. https://www.google.com/url?sa=t&source=web&rct=j&url=https://docs.python.org/3/library/functions.html&ved=2ahUKEwidrOrnnqj1AhXLJjQIHUv0AssQFnoECDEQAQ&usg=AOvVaw2aflcS7kd-hLXzuZoQl_tg More on reddit.com
🌐 r/learnpython
5
0
January 10, 2022
About iterating over a list of tuples
I'm not sure what you're asking. It's possible because the implementors of Python made it possible. The other syntax will also work of course, if you want the tuple as a whole, but anywhere you have multiple items you can always destructure them into individual variables. It's exactly the same as doing this for example: a, b = [1, 2] More on reddit.com
🌐 r/learnpython
7
4
November 27, 2024
using the 'enumerate' function to iterate over a list with index and value
Enumerate is a generator. Like when you call range() in a loop. They yield values. More on reddit.com
🌐 r/pythontips
4
10
March 25, 2024
People also ask

What does enumerate() do in Python?
enumerate() adds a counter to an iterable, returning pairs of (index, value).
🌐
pythonbasics.org
pythonbasics.org › home › python basics › enumerate explained (with examples)
Enumerate Explained (With Examples) - pythonbasics.org
How do you use enumerate() in a for loop?
for i, val in enumerate(my_list): gives you both the index and value.
🌐
pythonbasics.org
pythonbasics.org › home › python basics › enumerate explained (with examples)
Enumerate Explained (With Examples) - pythonbasics.org
Can you start enumerate() from a number other than 0?
Yes: enumerate(my_list, start=1) starts counting from 1.
🌐
pythonbasics.org
pythonbasics.org › home › python basics › enumerate explained (with examples)
Enumerate Explained (With Examples) - pythonbasics.org
🌐
Real Python
realpython.com › python-enumerate
Python enumerate(): Simplify Loops That Need Counters – Real Python
June 23, 2025 - >>> values = ["first", "second"] ... ~~~~^^^^^^^^^^^^^^^ StopIteration · In this example, you create a Python list called values with two elements, "first" and "second"....
🌐
Programiz
programiz.com › python-programming › methods › built-in › enumerate
Python enumerate() | Programiz
February 20, 2024 - ... # enumerate the list enumerated_languages = enumerate(languages) # convert enumerate object to list print(list(enumerated_languages)) # Output: [(0, 'Python'), (1, 'Java'), (2, 'JavaScript')]
🌐
Python Tips
book.pythontips.com › en › latest › enumerate.html
13. Enumerate — Python Tips 0.1 documentation
Here is an example: my_list = ['apple', 'banana', 'grapes', 'pear'] counter_list = list(enumerate(my_list, 1)) print(counter_list) # Output: [(1, 'apple'), (2, 'banana'), (3, 'grapes'), (4, 'pear')]
🌐
Codecademy
codecademy.com › docs › python › built-in functions › enumerate()
Python | Built-in Functions | enumerate() | Codecademy
April 14, 2025 - Learn the basics of Python 3.13, one of the most powerful, versatile, and in-demand programming languages today. ... Returns an enumerate object (iterator) containing tuples with the count (starting from the value of start) and values from the iterable. This example demonstrates how the enumerate() function is used on a list...
🌐
GeeksforGeeks
geeksforgeeks.org › enumerate-in-python
Enumerate() in Python - GeeksforGeeks
... By using enumrate() starts indexing from 0, we can customize this using the start parameter. if want the index to begin at value other than 0. ... a = ["geeks", "for", "geeks"] #Looping through the list using enumerate # starting the index ...
Published: January 20, 2025
Find elsewhere
🌐
Mimo
mimo.org › glossary › python › enumerate-function
Python enumerate(): Loop with an Index and start=
However, considering profiling different approaches if performance is critical in a tight loop with large data sets. ... # Example of enumerating with a large list large_list = list(range(1000000)) for i, val in enumerate(large_list): # Perform ...
🌐
Coursera
coursera.org › tutorials › how to enumerate in python: step by step
How to Enumerate in Python: Step by Step | Coursera
February 24, 2023 - The code works in the same way as the previous examples with a list, except that a tuple is used instead. enumerate takes a tuple as an argument and returns an enumerate object, which contains pairs of indices and corresponding items from the tuple. However, if you need to use enumerate to iterate through a list of tuples, you’ll write it a little differently: The enumerate function can help you write cleaner, more efficient for loops in Python.
🌐
Simplilearn
simplilearn.com › home › resources › software development › an introduction to enumerate in python with syntax and examples
An Introduction to Enumerate in Python with Syntax and Examples
August 24, 2025 - Enumerate is a built-in function in the python library. This tutorial will help you to learn all about enumerate in python with syntax and examples. Start now!
Address: 5851 Legacy Circle, 6th Floor, Plano, TX 75024 United States
🌐
Medium
medium.com › @datasciencejourney100_83560 › enumerate-function-in-py-1289137117e9
Enumerate Function in Python. The enumerate() function in Python is a… | by Rina Mondal | Medium
August 30, 2025 - ... # Syntax enumerate(iterable, start=0) # Example my_list = ['apple', 'banana', 'cherry'] for index, value in enumerate(my_list): print(index, value) # Output # 0 apple # 1 banana # 2 cherry
🌐
Great Learning
mygreatlearning.com › blog › it/software development › python enumerate(): simplify looping with counters
Python enumerate(): Simplify Looping With Counters
January 6, 2025 - You can use Python Enumerate Function to specify a different starting index value by adding the second parameter. my_list = ['apple,' 'banana,' 'cherry,' 'date'] for index, item in enumerate(my_list, start=1): print(index, item) The output will ...
🌐
freeCodeCamp
freecodecamp.org › news › what-is-enumerate-in-python
What is enumerate() in Python? Enumeration Example
December 22, 2022 - By Suchandra Datta The enumerate() function is one of the built-in functions in Python. It provides a handy way to access each item in an iterable, along with a count value that specifies the order in which the item was accessed. In this article you...
🌐
Tutorialspoint
tutorialspoint.com › python › python_enumerate_function.htm
Python enumerate() Function
The enumerate() function is one of the built-in functions and does not require any module to import. The following is the syntax for the python enumerate() function.
🌐
Afternerd
afternerd.com › blog › python-enumerate
Python Enumerate Explained (With Examples) - Afternerd
August 20, 2019 - So if you enumerate over a string, you will get back the index and value of each character in the string. ... str = "Python" for idx, ch in enumerate(str): print("index is %d and character is %s" \ % (idx, ch))
🌐
ScholarHat
scholarhat.com › home › tutorials › python › the enumerate() function ..
The enumerate() Function in Python
September 11, 2025 - It allows us to loop through our list. Enumerate() is used to maintain track of both the index and the item at the same time. In this Python Tutorial, we will explore more about enumerate() in Python, including the enumerate() function with examples and its syntax.
🌐
DataCamp
datacamp.com › home › tutorials › python › python enumerate tutorial
Python Enumerate Tutorial | DataCamp
May 20, 2022 - The application of the enumerate() function on a tuple is identical to the same on a list: drinks = ('tea', 'coffee', 'cappuccino', 'lemonade') enumerated_drinks = enumerate(drinks) print(enumerated_drinks) ... Again, we obtained an enumerate object whose items are inaccessible with common ...
🌐
Guru99
guru99.com › home › python › python enumerate() function: loop, tuple & string
Enumerate() Function in Python: Loop, Tuple, String ...
October 7, 2026 - Enumerate method comes with an automatic counter/index to each of the items present in the Enumerate list in Python. The firstindex value will start from 0. You can also specify the startindex by using the optional parameter startIndex in enumerate. Example In the code below, mylist is the list given to Enumerate function in Python.
🌐
freeCodeCamp
freecodecamp.org › news › python-enumerate-python-enum-for-loop-index-example
Python Enumerate – Python Enum For Loop Index Example
September 22, 2021 - Now the count variable is no longer accurately keeping track of how many times we have looped over the list. Instead of incrementing a count variable ourselves, we can use the enumerate() function with the for loop. Python's built in enumerate() function takes in an iterable and an optional start argument.
🌐
Intellipaat
intellipaat.com › home › blog › enumerate() in python – a detailed explanation
Enumerate() in Python - A Detailed Explanation
March 26, 2025 - Python’s enumerate() is a built-in Python function that adds a counter to an iterable and returns the enumerate object. This enumerate python may be turned into a list of tuples using the list() method or used straight in a for loop.