时间:2022-09-05 11:03:32 | 栏目:Python代码 | 点击:次
a = {'python',256,('sbvsb',251)}
print(a)
b = set('python')
print(b)
c = {'python',256,'python',256}
print(c)




>>>'p' in {‘p','y','t','h'}
True
>>>{‘p','y'} <= {‘p','y','t','h'}
True
>>>ls = [‘p','p','y','y','t','h']
>>>s = set(ls)
{‘p','y','t','h'}
>>>ls = list(s)
[‘p','y','t','h']