Python : Dictionary
※ 매번 비슷한 내용을 구글링하는 것에 답답해서 항목별로 정리하는 글 dict = {'one'=1, 'two'=2} dict['three'] = 3 Dictionary 추가 : key와 value를 추가 dict = {'one'=0, 'two'=2} dict['one'] = 1 Dictionary 수정 : 해당 key의 value를 수정 dict = {'one':1, 'two':2, 'three':3} del(dict['one']) Dictionary 삭제 list_key = ['A','B','C'] list_value = [1,2,3] ### 1 dict = {string : 0 for string in list_key} # {'A':0, 'B':0, 'C':0} dict = {string : i fo..
더보기