collections.Counter() 파이썬 collections 모듈의 Counter클래스를 사용하면 동일한 값의 데이터가 몇 개 들어갔는지 딕셔너리 형태로 출력한다. 예 ) collections.Counter(['java','파이썬','python','자바','C','파이썬','자바']) collections.Counter({'pyton':5, 'C':6}) 변수에 넣어서 사용하기 collections.Counter()를 변수에 선언하고 값을 넣으려면 update()를 사용해야한다. : cnt = collections.Counter() cnt.update('간장공장공장장') cnt 위와 같은 상태로 update를하면 value값이 더해진다. : cnt.update({'간':10,'장':20}) cn..