How to change the value of specific key in dictionary with Python

1 Answer

0 votes
dict = {
    "name": "Tom",
    "age": 47,
    "langauge": "python", 
    "company":  "google"}
     
print(dict)

dict['company'] = 'microsoft'

print(dict)
 
 
 
'''
run:
 
{'name': 'Tom', 'age': 47, 'langauge': 'python', 'company': 'google'}
{'name': 'Tom', 'age': 47, 'langauge': 'python', 'company': 'microsoft'}
 
'''

 



answered Jan 12, 2021 by avibootz
...