Apr-23-2019, 01:50 PM
(This post was last modified: Apr-23-2019, 01:51 PM by ichabod801.)
I have wrote it in this way. but some one told me that I can Use Boolean-without any further info and I am wonder how?!!
firststring = input() #ahhellllloou to_find = "hello" def check_string(firststring, to_find): c = 0 for i in firststring: #print(i) if i == to_find[c]: c += 1 if c == len(to_find): return "YES" return "NO" print(check_string(firststring, to_find))