A

Admin • 833K Points
Coach

Q. What does `enumerate()` do?

  • (A) Counts list items
  • (B) Returns index and item pairs
  • (C) Creates a list
  • (D) Sorts a list
  • Correct Answer - Option(B)
  • Views: 22
  • Filed under category Python
  • Hashtags:

Explanation by: Admin

`enumerate()` returns both index and value when looping over an iterable.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.