def remove_duplicates(x):
    return [x[0]] + [x[i] for i in range(1, len(x)) if x[i] != x[i - 1]]