I got list like:
[1,1,5,4,6,6,5]
and I want to drop the element of list, if its get repeated.
Output:
[1,5,4,6,5]
I can only find solution for "normal" Duplicate-Problems.
>Solution :
You can use itertools.groupby and just pull the key for each group.
from itertools import groupby
[k for k, _ in groupby([1,1,5,4,6,6,5])]
# returns:
[1, 5, 4, 6, 5]