What would be the best way to find the index of a specified character in a list containing multiple characters?
>>> ['a', 'b'].index('b') 1
If the list is already sorted, you can of course do better than linear search.
2.1m questions
2.1m answers
60 comments
57.0k users