def all_rotations(number):
    """Finds all rotations of a number (e.g. 123 => 123, 231, 312"""
    out = [number]
    str_num = str(number)
    current = str_num[-1] + str_num[:-1]
    while int(current) not in out:
        out.append(int(current))
        current = current[-1] + current[:-1]

    return out