Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Created March 9, 2021 18:15

Revisions

  1. BetterProgramming created this gist Mar 9, 2021.
    9 changes: 9 additions & 0 deletions filter.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    >>> filter_list = [1,2,3,4,5]
    >>> filter_list = filter(lambda x: x > 2, filter_list)
    >>> next(filter_list)
    3
    >>> next(filter_list)
    4
    >>> next(filter_list)
    5
    >>>