What does `enumerate([‘a’, ‘b’, ‘c’])` provide when iterated?

Python Developer Easy

Python Developer — Easy

What does `enumerate([‘a’, ‘b’, ‘c’])` provide when iterated?

Key points

  • Enumerate() returns an iterable of tuples
  • Each tuple contains the index and value of the element
  • It simplifies accessing both the index and value in a loop

Ready to go further?

Related questions