+ 1
Can we change the keys of a dictionary?
6 odpowiedzi
+ 7
Since keys are what dictionaries use to lookup values, you can't really change them. The closest thing you can do is to save the value associated with the old key, delete it, then add a new entry with the replacement key and the saved value.
+ 2
No we can't change the keys of dictionary as they Are immutable
+ 1
Keys of dicts are immutable
+ 1
Code Crasher might be an accident or sth. else.
Not too serious