列表的去重
1、使用set的特型,python的set和其他语言类似, 是一个无序不重复元素集
orgList = [1,0,3,7,7,5]
#list()方法是把字符串str或元组转成数组
formatList = list(set(orgList))
print (formatList)
2、使用keys()方法
orgList = [1,0,3,7,7,5]
#list()方法是把字符串str或元组转成数组
formatList = list({}.fromkeys(orgList).keys())
print (formatList)