"Python 딕셔너리"의 두 판 사이의 차이

4번째 줄: 4번째 줄:
;파이썬 딕셔너리 ( key & value )
;파이썬 딕셔너리 ( key & value )
* 예: {'a':1, 'b':2}
* 예: {'a':1, 'b':2}
* 파이썬 3.7 버전부터는 순서가 있다.
: 3.6까지는 순서가 없었다. (key의 순서가 바뀌는 등 보장이 없었다.


<syntaxhighlight lang='python' run>
foo = {'a':1, 'b':2}
print(foo)
</syntaxhighlight>
<syntaxhighlight lang='python' run>
<syntaxhighlight lang='python' run>
mydict1 = {
mydict1 = {

2021년 8월 6일 (금) 10:44 판

1 개요

Python Dictionaries
Python dictionary, dict
파이썬 딕셔너리 ( key & value )
  • 예: {'a':1, 'b':2}
  • 파이썬 3.7 버전부터는 순서가 있다.
3.6까지는 순서가 없었다. (key의 순서가 바뀌는 등 보장이 없었다.
foo = {'a':1, 'b':2}
print(foo)
mydict1 = {
  "brand": "Ford",
  "model": "Mustang",
  "year": 1964
}
print(mydict1)

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}