Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
enumerate solution in Clear category for Second Index by rodka81
def second_index(text: str, symbol: str) -> [int, None]:
try:
return [i for i, a in enumerate(text) if a == symbol][1]
except IndexError:
return None
Aug. 28, 2018
Comments: