First time here? Check out the FAQ!
answered 2022-10-26 13:34:45 +0100
For example via list comprehension:
B = [A[i] for i in range(len(A)) if i==0 or A[i]!=A[i-1]]