Python3.7之字典
一、Python 字典(Dictionary) fromkeys()方法
用于创建一个新字典,以序列 seq 中元素做字典的键,value 为字典所有键对应的初始值,返回一个新字典。
seq = ('Google', 'Runoob', 'Taobao')
dict = dict.fromkeys(seq)
print "新字典为 : %s" % str(dict)
dict = dict.fromkeys(seq, 10)
print "新字典为 : %s" % str</