First time here? Check out the FAQ!
answered 2019-10-29 15:06:16 +0100
Alternative solution:
sage: D={1:{2:3,4:2},2:{}} sage: D[1].update({5:'smile'}) sage: D {1: {2: 3, 4: 2, 5: 'smile'}, 2: {}}
Possibly more readable...