len()
测量字典中,键值对的个数
1 | dict = {'name':'jwq','sex':'man','number':'123456'} |
keys&&values
返回一个包含字典所有KEY的列表
1 | dict = {'name':'jwq','sex':'man','number':'123456'} |
items
返回一个包含所有(键,值)元祖的列表
1 | dict = {'name':'jwq','sex':'man','number':'123456'} |
遍历(带下标)
1 | dict = {'name':'jwq','sex':"man",'number':'123456'} |