Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
try...except solution in Clear category for Second Index by mlahor
def second_index(text: str, symbol: str) -> [int, None]:
try:
j=text.index(symbol)+1
return j+text[j:].index(symbol)
except:
return None
April 3, 2021