dict.py
= {
capitals "France": "Paris",
"United Kingdom": "London",
"USA": "Washington DC",
"Kenya": "Nairobi"
}
for country, capital in capitals.items():
print("The capital of", country, "is", capital)
dict.py
= {
capitals "France": "Paris",
"United Kingdom": "London",
"USA": "Washington DC",
"Kenya": "Nairobi"
}
for country, capital in capitals.items():
print("The capital of", country, "is", capital)
Terminal/Command Prompt
python dict.py
The capital of France is Paris
The capital of United Kingdom is London
The capital of USA is Washington DC
The capital of Kenya is Nairobi