Created
January 18, 2021 16:08
-
-
Save BetterProgramming/f2a5517d793d9256e8bd6d83a122fd7f to your computer and use it in GitHub Desktop.
This file contains 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
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