去除重复的元素的函数 test = [1,2,3,4,5,3,5,4,5,3,2,5,2,3] print list(set(test)) ok,输出[1,2,3,4,5] 转载于:https://my.oschina.net/Zoran1/blog/862047