asked
Getting Started with Programming: Introduction to Python (Inflearn Original)
Dictionary (5-1): Dictionaries are useful and are often used.
Written on
·
419
0
a = {0: 'Hello World'}
a.update ( 0 = 'Hello Python')
로 돌리면 오류가 발생하는데, 숫자 key에서는 update 함수 사용이 불가한가요?
Answer 1
a.update ( {0 : 'Hello Python'})
형태로 사용해야 해요