Feb-20-2020, 10:08 AM
(Feb-19-2020, 09:43 PM)evansmb Wrote: I'm trying to enter several key/value pairs in a dictionary, however it appears each update overwrites the previous addition.
Yes, this is the core feature of Python dictionary:
Quote:It is best to think of a dictionary as a set of key: value pairs, with the requirement that the keys are unique (within one dictionary).
/../
If you store using a key that is already in use, the old value associated with that key is forgotten.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.