Given a list [\"foo\", \"bar\", \"baz\"] and an item in the list \"bar\", how do I get its index (1) in Python?
[\"foo\", \"bar\", \"baz\"]
\"bar\"
1
a = ["foo","bar","baz",'bar','any','much'] indexes = [index for index in range(len(a)) if a[index] == 'bar']