📌  相关文章
📜  如果不存在则添加密钥 python 代码示例

📅  最后修改于: 2022-03-11 14:45:59.477000             🧑  作者: Mango

代码示例1
# credit to Stack Overflow user in the source link
# d is your dictionary

if key not in d:
    d[key] = value