find index of a substring in a string python code example Example: python get index of substring in liast index = [idx for idx, s in enumerate(l) if 'tiger' in s][0]