1 개요[ | ]
- Python Dictionaries
- Python dictionary, dict
- 파이썬 딕셔너리 ( key & value )
- 예: {'a':1, 'b':2}
- 파이썬 3.7 버전부터는 순서가 있다.
- 3.6까지는 순서가 없었다. (key의 순서가 바뀌는 등 보장이 없었다.)
Python
Copy
foo = {'a':1, 'b':2}
print(foo)
Loading
Python
Copy
foo = {'a':1, 'b':2}
foo['c'] = 3
print(foo)
Loading
Python
Copy
mydict1 = {
"brand": "Ford",
"model": "Mustang",
"year": 1964
}
print(mydict1)
Loading
2 같이 보기[ | ]
3 참고[ | ]
편집자 Jmnote 에어컨
로그인하시면 댓글을 쓸 수 있습니다.