Dictionaries in Python are mutable, which means their values can be modified after creation.
Change Value using Key :
Python
student = { "name": "Ram", "age": 21, "course": "B.Tech" } student["age"] = 22 print(student) #output {'name': 'Ram', 'age': 22, 'course': 'B.Tech'} update( ) method :
Python
student = { "name": "Ram", "age": 21, "course": "B.Tech" } student.update({ "age": 23, "course": "CSE", "grade": "A" }) print(student) #output {'name': 'Ram', 'age': 23, 'course': 'CSE', 'grade': 'A'}