题解 | #首都#
首都
http://www.nowcoder.com/practice/03a5031ed7ad4a7db897fd9ed982ea57
d1={'Capital': 'China'}
d2={'Capital': 'Russia'}
d3={'Capital': 'France'}
cities_dict={'Beijing': d1,'Moscow': d2,'Paris':d3 }
for i in list(sorted(cities_dict.keys())):
va=str(cities_dict.get(i).get('Capital'))
print('%s is the capital of ' f'{va}''!'%i)
d2={'Capital': 'Russia'}
d3={'Capital': 'France'}
cities_dict={'Beijing': d1,'Moscow': d2,'Paris':d3 }
for i in list(sorted(cities_dict.keys())):
va=str(cities_dict.get(i).get('Capital'))
print('%s is the capital of ' f'{va}''!'%i)