쉬엄쉬엄블로그

Python collections 본문

코딩

Python collections

쉬엄쉬엄블로그 2022. 4. 14. 14:17
728x90

import collections

 

D = collections.defaultdict(int)

=> 초기값이 주어진 dictionary 변수

 

D = collections.OrderedDict( )

=> 순서를 가진 dictionary 변수

=> python 3.9? 이상부터는 default dict가 됨

'코딩' 카테고리의 다른 글

Python pandas dataframe groupby, groups, isin  (0) 2022.05.18
Python set  (0) 2022.04.14
Python permutations  (2) 2022.04.11
Python PriorityQueue  (0) 2022.04.09
Python any(), all()  (0) 2022.04.02
Comments