如何从Python字典中删除键?
发布于 2021-02-02 23:14:55
从字典中删除键时,我使用:
if 'key' in myDict:
del myDict['key']
有没有一种方法可以做到这一点?
关注者
0
被浏览
92
1 个回答