Json 구조의 로그 파일 분석 Json 구조의 로그 파일을 분석하는 코드를 작성해보자. 간단한 설명은 주석을 참고해보자. Log file Example Line-by-line json type. 라인 단위로 Json 형태의 로그가 저장되어있는 파일이다. {"success":"true", "fileType":"pdf", "summary":[{"page_count":"3", "sentence_count":"20", "char_count":"80"}]} {"success":"true", "fileType":"docx", "summary":[{"page_count":"6", "sentence_count":"50", "char_count":"140"}]} Code import json import os file..
딕셔너리(Dictionary) dic = { key1:value1, key2:value2, ...} # key, value 값을 갖는 자료구조 -> 빠른 입력과 출력# list in R = Python dictionary # Dictionary 생성>>> fruits = {'이름':'사과', '가격':2000, '수량':10}>>> fruits{'이름': '사과', '가격': 2000, '수량': 10}>>> type(fruits) # 새로운 key:value 삽입>>> fruits['크기'] = '중'>>> fruits{'이름': '사과', '가격': 2000, '수량': 10, '크기': '중'} # 수정 >>> fruits['크기'] = ['중','소'] # 리스트로도 수정 가능>>> fruits{..