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