What does enumerate() return when iterating over a list?

Python Developer Medium

Python Developer — Medium

What does enumerate() return when iterating over a list?

Key points

  • enumerate() returns tuples of (index, element) pairs
  • It simplifies iterating over a list by providing both index and element
  • The function does not return a dictionary or a list of indices only

Ready to go further?

Related questions