Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

README.md

Frozenset & Collections

Frozenset

fs = frozenset([1,2,3])
# fs.add(4)  # Error! frozenset is immutable

collections module

from collections import Counter, defaultdict, OrderedDict
c = Counter('aabbc')
d = defaultdict(int)
d['missing'] += 1
od = OrderedDict([('a', 1), ('b', 2)])