I want the results of the function to be:
def all_equals(xs): x0 = next(iter(xs), False) return all(bool(x) == bool(x0) for x in xs)