list 안에 있는 데이터들 중복 카운터 하기
- from collections import Counter를 이용한 list 값 카운트
- 딕트 형태로 리턴.
from collections import Counter
# count list엔 0 ~ 9 숫자가 들어있음.
result = Counter(count)
print(count)
'Study > Code' 카테고리의 다른 글
PIL Image Crop & Paste (0) | 2020.09.18 |
---|---|
python href 크롤링 (0) | 2019.08.13 |
numpy를 이용해 새로운 array 만들기. (0) | 2019.02.16 |
Python Asterisk 가변인자. *args, **kargs (0) | 2018.12.28 |
Python lamdba, map ,reduce (0) | 2018.12.27 |