Given a list ["foo", "bar", "baz"] and an item in the list "bar", how do I get its index (1) in Python?
Fixed the question formation - missing auxiliary (or helping) verb - see e.g. <https://www.youtube.com/watch?v=t4yWEt0OSpg&t=1m49s> (see also <https://www.youtube.com/watch?v=kS5NfSzXfrI> (QUASM)) - alternatively, drop the question mark.
Peter Mortensen
- 31.4k
- 22
- 110
- 134
cobrexus
- 4.9k
- 5
- 24
- 53
pradyunsg
- 19.9k
- 11
- 48
- 99