(iterable)
return next(g, True) and not next(g, False)
Returns True if all the elements are equal to each other
Returns True if all the elements are equal to each other
Returns True if all the elements are equal to each other
def all_equal(iterable):
    """Returns True if all the elements are equal to each other"""
    g = groupby(iterable)
    return next(g, True) and not next(g, False)
def all_equal ( iterable ) : g = groupby ( iterable ) return next ( g , True ) and not next ( g , False )