I'm new to Python so might be making a clear error but would appreciate some help on why this code is producing a substring not found error. Thanks!
def second_index(text: str, symbol: str):
if symbol in text:
txt = list(text)
n = txt.index(symbol)
for pp in txt[n+1:]:
return pp.index(symbol)
else:
return None
Created at: 2020/01/14 08:41; Updated at: 2020/01/15 05:51