1 def deDict(dict_o,value=None): 2 3 if type(dict_o) is dict and "william" in dict_o.keys(): 4 if dict_o['william']=value 5 dict_0=None 6 print(dict_o) 7 deDict({"dict_o":"value","william":"None"},"who")
如果字典william为空,就给他赋值