Home / Python Tips Generated By ChatGPT / The filter() Function for Filtering Iterables in Python Filter items out of an iterable. Source Code numbers = [1, 2, 3, 4, 5, 6] even = filter(lambda x: x % 2 == 0, numbers) print(list(even))