[Python] 字典Dictionaries的用法 dict
宣告
diction_A= {}
diction_A= {'key':'value'}
範例:
stutend={'one':'Lily' , 'two':'lisa' , 'three':'Peter'}
新增:
stutend['four']='Amy'
>>> stutend={'one':'Lily' , 'two':'lisa' , 'three':'Peter' , 'four':'Amy'}
留言
張貼留言