how to safely remove elements from a list in Python,[x for x in a if x <= 1 or x >= 4]