[python] Pythonic way of checking if a condition holds for any element of a list