列表转集合去重

#_*_coding:utf-8_*_
#__author__ = "csy"

List = [4,3,5,1,2,3,9,10,8,5,11]
List = set(List)
print(List)
print(type(List))

输出 :

{1, 2, 3, 4, 5, 8, 9, 10, 11}
<class 'set'>

 

posted on 2017-08-27 23:06  csy113  阅读(89)  评论(0编辑  收藏  举报