To iterate over a list and its indices simultaneously, you can use the ____ function.

  • enumerate
  • for
  • index
  • range

The enumerate function is used in Python to iterate over a list and its corresponding indices. It returns pairs of index-value tuples, making it convenient for tasks that require both the index and the value during iteration.

Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *