def check_equal(iterator):
    """ returns true if all items in iterator are equal, otherwise returns false """

    iterator = iter(iterator)
    try:
        first = next(iterator)
    except StopIteration:
        return True
    return all(first == rest for rest in iterator)