Is it possible to add a key to a Python dictionary after it has been created?
It doesn\'t seem to have an .add() method.
.add()
first to check whether the key already exists
a={1:2,3:4} a.get(1) 2 a.get(5) None
then you can add the new key and value