技术手册
文章 标签 系列 关于
技术手册
取消
文章标签系列关于

Python 修改字典的 key

HenryZ  2021-11-19  更新于  2022-11-21 
目录
dictionary[new_key] = dictionary.pop(old_key)

.pop() 将 Key-Value 条目取出(从字典中删除并返回该条目)

参考文章:

  • Change the name of a key in dictionary

推广:阿里云百炼大模型 9折优惠 + 所有模型各百万免费Token →
 Python
返回 | 主页
2025  技术手册
[ 缓坡漫步 ]