'msftmy_dict[ 'itmy_dict['it'traceback (most recent call last)file ""line in my_dict['it'keyerror'itfrom the above code we can observe thatfirst we create dictionary with two elements and assign it to the variable my_dict each element is key-value pairand the whole set of elements is enclosed in curly braces the number is the key and msft is its value similarly is the key and it is its value you can get values by keybut not vice-versa thus when we try my_dict['it'it raises an exceptionbecause it is not key modifying dictionaries observe the following code to understand about modifying dictionarymodifying dictionary my_dict { 'msft' 'it'my_dict[ 'softwaremy_dict { 'msft' 'software'my_dict[ 'microsoft technologiesmy_dict { 'msft' 'software' 'microsoft technologies'from the above code we can observe thatyou cannot have duplicate keys in dictionary altering the value of an existing key will delete the old value you can add new key-value pairs at any time