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']
本篇文章就到这里了,希望能给你带来帮助,也希望您能够多多关注脚本之家的更多内容!