I have been working with dictionaries that I have to modify within different parts of my code. I am trying to make sure if I do not miss anything about there is no need for dict_update() in any scenario.
So the reasons to use update() method is either to add a new key-value pair to current dictionary, or update the value of your existing ones.
But wait!?
Aren't they already possible by just doing:
>>>test_dict = {'1':11,'2':1445}
>>>test_dict['1'] = 645
>>>test_dict
{'1': 645, '2': 1445}
>>>test_dict[5]=123
>>>test_dict
{'1': 645, '2': 1445, 5: 123}
In what case it would be crucial to use it ? I am curious.
Many thanks