📜  在 python 代码示例中使用字典键获取值

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

代码示例2
print(d.get('key5', 'NO KEY'))
# NO KEY

print(d.get('key5', 100))
# 100