What is the difference between updation and addition of elements to a dictionary?
Answer:
The difference between updation and addition of elements to a dictionary is that updation means changing the value of an existing key , while addition means adding a new key-value pair to the dictionary.
To update a value, you can use the assignment operator = or the update() method.The assignment operator takes the name of the dictionary followed by the key in square brackets as the left operand and the new value as the right operand.
To add a new key-value pair, you can also use the assignment operator = or the update() method. The assignment operator takes the name of the dictionary followed by the new key in square brackets as the left operand and the new value as the right operand.