python-集合,列表和元组

a = {11,22,33}

b = [11,22,33]

c = (11,22,33,22)

集合:type(a) -->>set#集合内元素不可重复,花括号括起来的还有 -->>字典

列表:type(b)-->>list

元组:type(c)-->>tuple


对列表进行去重复:

    f = set(c)

    e = list(f) #转回列表

猜你喜欢

转载自blog.csdn.net/qq_36625806/article/details/79548761