1
a = [1,1,1,2,3,3,4,5,6,6,6] a1 = [] for i in a: if i not a1: a1.append(i) else: continue
2
a = [1,1,1,1,2,3,4,4,4,5] a1 = set(a)
3
a = [1,1,1,1,1,2,3,3,4,5,6] for i in a: while a.count(i)>1: del a[a.index(i)]
4
import itertools a = [1,1,1,1,2,3,43,5] a1 = [] for i in itertools.groupby(a): a1.append(i)