摘要:
a={}result=a.setdefault("e")#return None and a add a new key-value pairprint a#a={"e":None}result-a.setdefault("e","eeee")#return None,because the dict already has "e" element so it return current "e"... 阅读全文
摘要:
a={}result=a.setdefault("e")#return None and a add a new key-value pairprint a#a={"e":None}result-a.setdefault("e","eeee")#return None,because the dict already has "e" element so it return current "e"... 阅读全文
|