python學習之字典

字典是python的基本類型之一。python

 

常見方法spa

setdefault(key [,default])

若是鍵在字典中,則返回其值。若是沒有,就插入具備默認值的鍵,並返回默認值。默認值爲None。code

相關文章
相關標籤/搜索