5 Mar
2019
5 Mar
'19
11:10 a.m.
I just wanted to mention this since it hasn't been brought up, but neither of these work a.keys() + b.keys() a.values() + b.values() a.items() + b.items() However, the following do work: a.keys() | b.keys() a.items() | b.items() Perhaps they work by coincidence (being set types), but I think it's worth bringing up, since a naive/natural Python implementation of dict addition/union would possibly involve the |-operator. Pål