[Solved] find certain string in string

[ad_1]

You could try solving the problem by patter matching the input string by using regular expression. Basic example for your case:

import re


input_str = input().lower()
pattern = re.compile(r'^h+e+l{2,}o+$')

if pattern.match(input_str):
    print('YES')
else:
    print('NO')

[ad_2]

solved find certain string in string