课程
/后端开发
/Python
/初识Python
我想打印出来的结果为:Bob的工资是:3500
jack的工资是:6000
2018-03-12
源自:初识Python 6-1
正在回答
mydict={'Bob':{'salary':'3500'},'jack':{'salary':'60000'}}
for key, value in mydict.items():
print('%s is money : %s'%(key,value['salary']));
Titan3958815 提问者
mydict = {'Bob':{'salary':'3500'},'Jack':{'salary':'6000'}}mydict1 = mydict.items()for name,salary in mydict1: print(name + '工资是' + salary['salary'])
举报
学python入门视频教程,让你快速入门并能编写简单的Python程序