javascript의 객체와 같은 자료구조라고 생각하면 된다.
dictionary = { 'key': 'value', 'ex': [1, 2, 3] } print(dictionary['key']) # 'value'
dictionary = { 'one': 1, 'two': 2 } # 'one'에 해당하는 값을 없애고 싶을 땐? del(dictionary['one']) # 또 다른 방법은 pop dictionary.pop('two')
dictionary + iteration 딕셔너리와 반복문 (0) | 2019.07.22 |
---|---|
PIP와 Virtualenv (0) | 2019.07.22 |
모듈 만들기 (0) | 2019.07.21 |
모듈 사용하기 (0) | 2019.07.21 |
for 반복문 (0) | 2019.07.21 |
댓글 영역