#方法一:(遍历去重)
>>>list1 = [1,2,3,4,5,5,4,3,2,1,0]
>>>temp = list1[:] #切片拷贝
>>>list1.clear() #列表删除
>>>for each in temp: #遍历列表
if each not in list1: #判断元素是否在列表list1中
list1.append(each) #如果元素不在list1中就添加到list1
>>>list1 #打印列表
[1,2,3,4,5,0]
>>>list1.sort(reverse=False) #sort()排序默认升序 reverse 翻转
>>>list1
[0,1,2,3,4,5]
#方法二:(集合去重)
>>>list2 = [1,2,3,4,5,5,4,3,2,1,0]
>>>list3 = list(set(list2))
>>>list3
[0,1,2,3,4,5]
#方法三:(利用字典健值去重)字典函数去重
>>>list2 = [1,2,3,4,5,5,4,3,2,1,0]
>>>d = {}
>>>d = d.fromkeys(list2)
>>>list3 = list(d.keys())
>>>print(list3)
[1,2,3,4,5,0]
...未完待续...