python-small-examples/md/30.md at master · data-python/python-small-examples

Latest commit

File metadata and controls

16 lines (12 loc) · 269 Bytes

@author jackzhenguo
@desc 
@date 2019/3/4

30 冻结集合  

创建一个不可修改的集合。

In [1]: frozenset([1,1,3,2,3])
Out[1]: frozenset({1, 2, 3})

因为不可修改,所以没有像set那样的addpop方法