I am looking for some help here, I have a list which is exactly this
list like this: [1, 1, 1, 5, 5, 5, 10, 10, 10, 10, 10, 10, 8, 8, 8, 8, 8, 8]
wanted result: [1, 5, 10, 10, 8, 8]
I have tried every possible way by iterating through the list 3 at a time and replacing only every third.
''.join([List[i] for i in range(len(List) - 1) if List[i + 1] != XX[i]] + [List[-1]])
I just can't get my head around it is there some python wizard who can do this?
Thanks