파이썬 - 딕셔너리(Dictionary) 자료형
딕셔너리(Dictionary) 딕셔너리 생성 딕셔너리는 기본적으로 중괄호를 이용하거나 혹은 dic() 함수를 이용하여 생성함. my_dict = {"name":"Max", "age":28, "city":"New York"} print(my_dict) {'name': 'Max', 'age': 28, 'city': 'New York'} # or use the dict constructor, note: no quotes necessary for keys my_dict_2 = dict(name="Lisa", age=27, city="Boston") print(my_dict_2) {'name': 'Lisa', 'age': 27, 'city': 'Boston'} 딕셔너리 항목에 접근 my_dict = {"name"..
프로그래밍 언어/파이썬
2021. 2. 10. 13:18