Created
March 6, 2019 02:42
-
-
Save sparkydogX/39021fbb7b77de540fd75af23eae3739 to your computer and use it in GitHub Desktop.
Revisions
-
sparkydogX created this gist
Mar 6, 2019 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ def evenFilter(d): if d['idx'] % 2 == 0: return True else: return False if __name__ == '__main__': L = [] for i in range(10): d={} d['idx'] = i L.append(d) print(L) fL = list(filter(evenFilter,L)) print(fL)