Python Tip #3 - Filtering Lists Posted on 21-09-2018 | In PythonTips Selecting elements from a list that satidfy a condition selected = [] for i in items: if condition: selected.append(i) # Simpler version using List comprehension selected = [i for i in items if condition]