Python딕셔너리update
items

update딕셔너리

pop

다른 딕셔너리나 키워드 인수로 값을 갱신합니다.

문법

dict.update(other)

예제

아래 값을 입력하면 예제에 즉시 반영됩니다.

person
print
person = {"name": "Alice"}
person.update({"age": 30, "city": "Seoul"})
print(person)
# {'name': 'Alice', 'age': 30, 'city': 'Seoul'}