Change value of a key in a nested dictionary
Write a Python program to change Brad’s salary to 8500 in the following dictionary.
Given:
Expected output:
{
'emp1': {'name': 'Jhon', 'salary': 7500},
'emp2': {'name': 'Emma', 'salary': 8000},
'emp3': {'name': 'Brad', 'salary': 8500}
}
Solution:
need an explanation for this answer? contact us directly to get an explanation for this answer