有没有办法重命名字典键,而无需将其值重新分配给新名称并删除旧名称键; 并且没有迭代通过dict键/值? 在OrderedDict的情况下,执行相同的操作,同时保持该键的位置.
python dictionary associative-array ordereddictionary
I want to change the key of an entry in a Python dictionary.
Is there a straightforward way to do this?
python dictionary sequence
dictionary ×2
python ×2
associative-array ×1
ordereddictionary ×1
sequence ×1