🌐
W3Schools
w3schools.com › python › ref_func_enumerate.asp
Python enumerate() Function
Remove List Duplicates Reverse ... Syllabus Python Study Plan Python Interview Q&A Python Training ... The enumerate() function takes a collection (e.g....
🌐
GeeksforGeeks
geeksforgeeks.org › python › enumerate-in-python
Enumerate() in Python - GeeksforGeeks
Explanation: list(enumerate(a)) converts index-element pairs into a list of tuples.
Published: May 8, 2026
Discussions

w3schools lists tutorials; half of the functions they use don't seem to work?
The index(), count() and other "functions" you mention aren't standalone functions, they are methods of lists. That means you apply them to the list, like this: test = [1, 2, 3, 4, 5, 6] print(test.index(3)) # print index in list of the element of value 3 The list methods are described in the documentation . More on reddit.com
🌐 r/learnpython
5
2
October 2, 2023
Am I the only person who thinks W3schools isn't a great resource to learn?
I think people who know the basics and go to w3 to refresh stuff recommend it but they themselves didn't learn it there. More on reddit.com
🌐 r/learnprogramming
75
98
March 13, 2022
Shuffling a list
The line in bold is what is giving me an error It's a good idea to post the full error message when asking for help with an error. Besides that i assume you are trying to shuffle a string, you can't do that in python. You need to shuffle a list, and then rejoin it back to a string. pass_list = list(password) random.shuffle(pass_list) password = "".join(pass_list) print(password) More on reddit.com
🌐 r/learnpython
4
2
March 13, 2021
[deleted by user]
Thanks for the tutorial! More on reddit.com
🌐 r/learnpython
26
171
March 2, 2022
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
🌐
Programiz
programiz.com › python-programming › methods › built-in › enumerate
Python enumerate()
The enumerate() function adds a counter to an iterable and returns it as an enumerate object (iterator with index and the value). ... # enumerate the list enumerated_languages = enumerate(languages) # convert enumerate object to list print(list(enumerated_languages)) # Output: [(0, 'Python'), ...
🌐
W3Schools
devcom.w3schools.com › python › ref_func_enumerate.asp
Python enumerate() Function
Remove List Duplicates Reverse a String Add Two Numbers · Python Examples Python Compiler Python Exercises Python Quiz Python Bootcamp Python Certificate ... The enumerate() function takes a collection (e.g.
🌐
Python Tips
book.pythontips.com › en › latest › enumerate.html
13. Enumerate — Python Tips 0.1 documentation
And there is more! enumerate also accepts an optional argument that allows us to specify the starting index of the counter. my_list = ['apple', 'banana', 'grapes', 'pear'] for c, value in enumerate(my_list, 1): print(c, value) # Output: # 1 apple # 2 banana # 3 grapes # 4 pear
🌐
W3schoolsapp
w3schoolsapp.com › python › ref_func_enumerate.html
Python enumerate() Function
The enumerate() function adds a counter as the key of the enumerate object. ... Tabs Dropdowns Accordions Side Navigation Top Navigation Modal Boxes Progress Bars Parallax Login Form HTML Includes Google Maps Range Sliders Tooltips Slideshow Filter List Sort List ... If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail: ... Your message has been sent to W3Schools. HTML Tutorial CSS Tutorial JavaScript Tutorial How To Tutorial SQL Tutorial Python Tutorial W3.CSS Tutorial Bootstrap Tutorial PHP Tutorial jQuery Tutorial Java Tutorial C++ Tutorial
🌐
Cach3
w3schools.com.cach3.com › python › ref_func_enumerate.asp.html
Python enumerate() Function - W3Schools
The enumerate() function adds a counter as the key of the enumerate object. ... Tabs Dropdowns Accordions Side Navigation Top Navigation Modal Boxes Progress Bars Parallax Login Form HTML Includes Google Maps Range Sliders Tooltips Slideshow Filter List Sort List · HTML CSS JavaScript SQL Python PHP jQuery Bootstrap XML Read More » ... If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail: ... Your message has been sent to W3Schools...
Find elsewhere
🌐
w3resource
w3resource.com › python › built-in-function › enumerate.php
Python enumerate() function - w3resource
Example: Python enumerate() function · fruits = ['Mango', 'Apple', 'Orange', 'Peach'] print(list(enumerate(fruits))) print(list(enumerate(fruits, start=1))) Output: [(0, 'Mango'), (1, 'Apple'), (2, 'Orange'), (3, 'Peach')] [(1, 'Mango'), (2, 'Apple'), (3, 'Orange'), (4, 'Peach')] Example: Fruits = ['Apple', 'Mango', 'Orange'] enumerateFruits = enumerate(Fruits) print(type(enumerateFruits)) # converting to list print(list(enumerateFruits)) # changing the default counter enumerateFruits = enumerate(Fruits, 10) print(list(enumerateFruits)) Output: <class 'enumerate'> [(0, 'Apple'), (1, 'Mango'), (2, 'Orange')] [(10, 'Apple'), (11, 'Mango'), (12, 'Orange')] Example: Looping Over an Enumerate object ·
🌐
Python Basics
pythonbasics.org › home › python basics › enumerate explained (with examples)
Enumerate Explained (With Examples) - pythonbasics.org
In Python you can iterate over the list while getting the index and value immediately. Practice now: Test your Python skills with interactive challenges · The basic syntax is is enumerate(sequence, start=0)
🌐
Real Python
realpython.com › python-enumerate
Python enumerate(): Simplify Loops That Need Counters – Real Python
October 21, 2025 - Python’s enumerate() function helps you with loops that require a counter by adding an index to each item in an iterable. This is particularly useful when you need both the index and value while iterating, such as listing items with their ...
🌐
Mimo
mimo.org › glossary › python › enumerate-function
Python enumerate Function: Master Index-Based Iteration
The built-in enumerate() function in Python adds a counter to a sequence and returns the combination as an enumerate object. The enumerate() function takes a sequence like a list, tuple, or string, and returns an enumerate object.
🌐
W3Schools
w3schools.com › python › trypython.asp
W3Schools online PYTHON editor
The W3Schools online code editor allows you to edit code and view the result in your browser
🌐
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 - In this example: my_list is a list of strings [‘apple’, ‘banana’, ‘cherry’]. we use the enumerate() function to iterate over my_list. In each iteration, enumerate() yields a tuple containing the index and value of the current item ...
🌐
Python
docs.python.org › 2.3 › whatsnew › section-enumerate.html
7 PEP 279: enumerate()
A new built-in function, enumerate(), will make certain loops a bit clearer. enumerate(thing), where thing is either an iterator or a sequence, returns a iterator that will return (0, thing[0]), (1, thing[1]), (2, thing[2]), and so forth. A common idiom to change every element of a list looks ...
🌐
Guru99
guru99.com › home › python › python enumerate() function: loop, tuple & string
Enumerate() Function in Python: Loop, Tuple, String ...
July 10, 2026 - What is Python Enumerate? Enumerate() function is a built-in function available with python. Enumerate() command adds a counter to each item of the iterable object and returns an enumerate object. In
🌐
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
🌐
Towards Data Science
towardsdatascience.com › home › artificial intelligence › looping in python
Looping in Python | Towards Data Science
September 18, 2020 - Instead of using the range() function, we can instead use the built-in enumerate() function in python. enumerate() allows us to iterate through a sequence but it keeps track of both the index and the element.
🌐
Coursera
coursera.org › tutorials › how to enumerate in python: step by step
How to Enumerate in Python: Step by Step | Coursera
February 24, 2023 - By default, the syntax of Python enumerate is as follows: ... You can adjust the enumerate function to fit your needs by changing its parameters. Enumerate has two parameters: 1. Iterable: The iterable is the sequence, list, or objects you select to enumerate.
🌐
Afternerd
afternerd.com › blog › python-enumerate
Python Enumerate Explained (With Examples) - Afternerd
August 20, 2019 - So as you know, indices in python start at 0. This means that when you use the enumerate function, the index returned for the first item will be 0. However, in some cases, you want the loop counter to start at a different number. enumerate allows you to do that through an optional start parameter. For example, let’s say we want to enumerate over a list starting at 1.
🌐
Intellipaat
intellipaat.com › home › blog › enumerate() in python – a detailed explanation
Enumerate() in Python - A Detailed Explanation
March 26, 2025 - List1 = [(10,”Red”), (5,”Green”), (8,”Black”),(2,”Blue”)]<br> for idx, (count, color) in enumerate(List1):<br> print(idx, count, color)<br> ... This method of getting values out of a tuple is also referred to as tuple unpacking. Alright, let us move ahead and see how to apply enumerate over a Python String.