Created
June 17, 2018 08:21
-
-
Save tml/93fb81123c01d0f6e224df1222aa541e 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 u_filter(func, iterable): | |
if f is None: | |
return (item for item in iterable if item) | |
return (item for item in iterable if func(item)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment