• Help - Substring not found / Wrong Index

Question related to mission Second Index

 

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