(Oct-18-2020, 02:04 PM)sudonym3 Wrote: And what it looks like to me is that the line "school_class[name] += (score,)" is modifying an already existing value contained within the dictionary ... but since this value is of type tuple, I thought that wouldn't be possible.
It's not modifying the tuple in the dictionary. It's creating a new tuple and putting that in the dictionary in its place. The original tuple isn't modified. You can see this by either looking at the object id, or by making a copy of it.