딕셔너리 1

중급 Python

Hugo Bowne-Anderson

Data Scientist at DataCamp

리스트

pop = [30.55, 2.77, 39.21]

countries = ["afghanistan", "albania", "algeria"]
ind_alb = countries.index("albania")
ind_alb
1
pop[ind_alb]
2.77
  • 편리하지 않음
  • 직관적이지 않음
중급 Python

딕셔너리

pop = [30.55, 2.77, 39.21]

countries = ["afghanistan", "albania", "algeria"] ...
{ }
중급 Python

딕셔너리

pop = [30.55, 2.77, 39.21]

countries = ["afghanistan", "albania", "algeria"] ...
{"afghanistan":30.55, }
중급 Python

딕셔너리

pop = [30.55, 2.77, 39.21]

countries = ["afghanistan", "albania", "algeria"] ...
world = {"afghanistan":30.55, "albania":2.77, "algeria":39.21}
world["albania"]
2.77
중급 Python

연습해 봅시다!

중급 Python

Preparing Video For Download...