myDict = {‘a‘:1,‘b‘:2,‘c‘:3,‘d‘:4} print(myDict) if ‘a‘ in myDict: del myDict[‘a‘] print(myDict)
原文地址:https://www.cnblogs.com/sea-stream/p/9985497.html
时间: 2024-10-10 04:30:30
myDict = {‘a‘:1,‘b‘:2,‘c‘:3,‘d‘:4} print(myDict) if ‘a‘ in myDict: del myDict[‘a‘] print(myDict)
原文地址:https://www.cnblogs.com/sea-stream/p/9985497.html