Skip to content

Instantly share code, notes, and snippets.

@tml tml/u_filter.py
Created Jun 17, 2018

Embed
What would you like to do?
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
You can’t perform that action at this time.