改成这样就可以了
rivers = {
'nile':'egypt',
'huanghe':'china',
'changjiang':'china',
}
for name in rivers:
print("The "+ name.title() +" runs through "+ rivers[name])
改成这样就可以了
rivers = {
'nile':'egypt',
'huanghe':'china',
'changjiang':'china',
}
for name in rivers:
print("The "+ name.title() +" runs through "+ rivers[name])