<s>[INST] Finding the index of an item given a list containing it in Python For a list ["foo", "bar", "baz"] and an item in the list "bar", what's the cleanest way to get its index (1) in Python?
 [/INST] >>> ["foo", "bar", "baz"].index("bar")
1

Reference: Data Structures > More on Lists
 </s>