A

Admin • 832.27K Points
Coach

Q. What does the `enumerate()` function do?

  • (A) Counts the elements in a list
  • (B) Returns index and value pairs from an iterable
  • (C) Sorts the elements
  • (D) Removes duplicates
  • Correct Answer - Option(B)
  • Views: 20
  • Filed under category Python
  • Hashtags:

Explanation by: Admin

`enumerate()` returns both index and item while looping through an iterable.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.