# 只更新原有字典,不创建新的字典, 重复会进行覆盖
dict_val = {'one': 1, 'three': 2}
dict_val .update({'three': 3, 'four': 4})
dict_val .update(four=10)
#
# 只更新原有字典,不创建新的字典, 重复会进行覆盖
dict_val = {'one': 1, 'three': 2}
dict_val .update({'three': 3, 'four': 4})
dict_val .update(four=10)
#
本文标题:Python 字典处理
本文链接:https://www.haomeiwen.com/subject/jojxuqtx.html
网友评论