0
点赞
收藏
分享

微信扫一扫

python dict 字典的修改操作 修改键对应的值

# 定义字典
d = {"age": 16}
# 修改值
print("根据键修改值")
d["age"] = 20

print(d)

举报

相关推荐

0 条评论