天天看點

集合-set(當對象是字元串時)

>>>  set('abcd')#集合類型
{'c', 'd', 'a', 'b'}

>>> sorted(set('abcd'))#排序後-類表類型
['a', 'b', 'c', 'd']