Classic Python topic: de duplication of a list or array [Hangzhou multi tester] [Hangzhou multi tester \wang Sir]
編輯:Python
list1 = [1,1,1,1,3,12,3,99,88,3,2]
list1.sort()
a = list1[-1]
for i in range(len(list1)-2,-1,-1):
if list1[i] == a:
list1.remove(list1[i])
else:
a = list1[i]
print(list1)