27 lines
747 B
Python
27 lines
747 B
Python
cities = {
|
|
'santiago': {
|
|
'country': 'chile',
|
|
'population': 6_310_000,
|
|
'nearby mountains': 'andes',
|
|
},
|
|
'talkeetna': {
|
|
'country': 'united states',
|
|
'population': 876,
|
|
'nearby mountains': 'alaska range',
|
|
},
|
|
'kathmandu': {
|
|
'country': 'nepal',
|
|
'population': 975_453,
|
|
'nearby mountains': 'himilaya',
|
|
}
|
|
}
|
|
|
|
for city, city_info in cities.items():
|
|
country = city_info['country'].title()
|
|
population = city_info['population']
|
|
mountains = city_info['nearby mountains'].title()
|
|
|
|
print(f"\n{city.title()} is in {country}.")
|
|
print(f" It has a population of about {population}.")
|
|
print(f" The {mountains} mounats are nearby.")
|