def rep_last(some_list, n):
    """ Makes a list have a number of elements divisible by n, by repeating the last entry """
    while not (len(some_list)%n == 0):
        some_list.append(some_list[-1])
    
    return some_list