Python dict easiest and cleanest way to get value of key2 if key1 is not present

后端 未结 0 581
失恋的感觉
失恋的感觉 2021-01-11 13:17

I have a python dict like this,

d = {
"k1" : "v1",
"k2" : "v2"
}

I want to pick up value of k1 from d

相关标签:
回答
  • 消灭零回复
提交回复
热议问题