[Dive Into Python]内置函数部类-字典dictionary

[Dive Into Python]内置函数类型--字典dictionary逼自己学基础知识,,每天一小节字典 Dictionary定义键-值

[Dive Into Python]内置函数类型--字典dictionary

逼自己学基础知识,,每天一小节

字典 Dictionary定义键-值之间的对应关系

键是唯一的pk

?

定义字典:大括号,冒号

>>> print a{'c': 2, 'b': 1, 'd': 3}>>> a['B']=5>>> print a{'c': 2, 'b': 1, 'd': 3, 'B': 5}>>> 

?