Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Find a needle in a haystack
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
@itbj

This comment has been minimized.

Copy link

@itbj itbj commented Jul 25, 2020

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.