I think this would be better as `if any(float(x) < 0 or float(x) > 0 for x in arg):` (and might as well change the rest in this function too).