Finding the index of an item in a list
Asked 07 September, 2021
Viewed 686 times
  • 56
Votes

Given a list ["foo", "bar", "baz"] and an item in the list "bar", how do I get its index (1) in Python?

30 Answer