[파이썬 라이브러리] Collections 모듈의 Counter 클래스
Counter 소개 from collections import Counter result_string = Counter('Hello World! hello world') result_list1 = Counter([1, 2, 2, 3, 3, 3, 4, 4, 4]) #result_list = Counter([1, 2, 2, 3, 3, 3, 4, 4, 4, ['a', 'b']]) result_list2 = Counter([1, 2, 2, 3, 3, 3, 4, 4, 4, ('a', 'b')]) result_tuple = Counter((1, 2, 2, 3, 3, 3, 4, 4, 4, ('a', 'b'))) result_dictionary = Counter({'name': 'pey', 'phone': '01199..