Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Custom Filter Method
def my_filter(function, iterable):
output = []
for item in iterable:
if function(item):
return output
numbers = range(1, 100)
print(my_filter(lambda x: x % 2 == 0, numbers))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment