Python filterfalse Iterator

Python filterfalse(contintion,data) iterator filter data based on condition is FALSE.

>>> from itertools import *
>>> data = [2,6,9,3,1,5]
>>> x = filterfalse(lambda x: x%2, data)
>>> for i in x: print (i)
2
6






















endmemo.com © 2024  | Terms of Use | Privacy | Home