python经典实例——字典
提问人:杨紫红发布时间:2020-11-26
#! /usr/bin/python
x={'a':'aaa','b':'bbb','c':12}
print (x['a'])
print (x['b'])
print (x['c'])
for key in x:
print ("Key is %s and value is %s" % (key,x[key]))
'''
知识点:
* 将他当Java的Map来用即可.
'''
x={'a':'aaa','b':'bbb','c':12}
print (x['a'])
print (x['b'])
print (x['c'])
for key in x:
print ("Key is %s and value is %s" % (key,x[key]))
'''
知识点:
* 将他当Java的Map来用即可.
'''
继续查找其他问题的答案?
相关视频回答
回复(0)
点击加载更多评论>>