You are viewing a single comment's thread. Return to all comments →
PYTHON:
def hackerrankInString(s):
for idx, chr in enumerate(list("hackerrank") ): try: index = s.index(chr) s = s[index+1:] except ValueError: return "NO" return "YES"
Seems like cookies are disabled on this browser, please enable them to open this website
HackerRank in a String!
You are viewing a single comment's thread. Return to all comments →
PYTHON:
def hackerrankInString(s):