列表转集合去重
#_*_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'>