Created
February 25, 2020 17:55
-
-
Save killreal17/cfb8aa92c838339c1791c416f6c7cbd4 to your computer and use it in GitHub Desktop.
Поиск подстроки в строке
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def entry (str, substr): | |
if len(str) < len(substr): | |
return False | |
else: | |
if str[:len(substr)] != substr: | |
return entry(str[1:], substr) | |
else: | |
return True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment