Is there a more concise way to print this out?
countries = {
'france': ['paris', 'bordeaux', 'marseille'],
}
for country, cities in countries.items():
print(f"These are some of the cities of {country.title()}:", end = ' ')
for city in cities:
if city != cities[-1]:
print(city.title(), end = ', ')
else:
print(f"{city.title()}.")
Expected output:
These are some of the cities of France: Paris, Bordeaux, Marseille.