python

딕셔너리 (Dictionary)

임이레 2022. 8. 25. 17:53

dictionary 의 구조

 

student = {"name" : ['Haeun', 'Dongdong','Yejun','bok'], "age" : [19,15,16,17]}

-> key : value 형식

 

-키와 값을 추가 하고 싶은 경우

-> student['math'] = [50,60,70,80]

 

-삭제하고 싶은 경우 

-> del student['math]

 

'python' 카테고리의 다른 글

엑셀 파일 / data 가공  (0) 2022.08.26
Pandas 와 Dataframe  (0) 2022.08.25
tuple '튜플' / set '집합'  (0) 2022.08.25
파이썬 정렬 sorted 함수  (0) 2022.05.10
최대공약수, 최소공배수  (0) 2022.05.04