What is the most Pythonic way to filter a set? April 9, 2024 by Tarik Using list comprehension is maybe more “pythonic”. filtered = [x for x in set(lst) if x < C]