Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from itertools import filterfalse
num1=["red","rain","region",'blue','purple','green']
result=filterfalse(lambda x:x.startswith("r"),num1)
print (result)#Output:<itertools.filterfalse object at 0x0148E4D8>
print (list(result))
#Output:
['blue', 'purple', 'green']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment