Created
July 18, 2020 10:33
-
-
Save raeq/19bd2a8fdb28dcf671dd80926ea9d64b to your computer and use it in GitHub Desktop.
Find a needle in a haystack
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 sub_00(haystack: str="", needle:str="") -> bool: | |
return needle in haystack | |
assert sub_00("the quick brown fox jumped over the lazy dog", "lazy") == True | |
assert sub_00("the quick brown fox jumped over the lazy dog", "lazys") == False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👍