Untitled

Run Settings
LanguagePython
Language Version
Run Command
def contains(s1, s2): if len(s1) == 0: return False if not contains_helper(s1, s2): return contains(s1[1:], s2) return True def contains_helper(s1, s2): # iterate through and see if it matches if len(s2) == 0: return True if len(s1) == 0: return False if s1[0] == s2[0]: return contains_helper(s1[1:], s2[1:]) return False s1 = 'racecar' s2 = 'rcr' print(contains(s1, s2))
Editor Settings
Theme
Key bindings
Full width
Lines