The post is similar to this but what I want, is to remove specific consecutive duplicate in a list. So let's say we have this list:
[1,1,1,2,2,3,2,4,4,4,1]
I want to have:
[1,2,2,3,2,4,4,4,1]
I want to remove only the "ones". I am trying itertools.groupby
but I haven't found a way to do it.