I have two lists. One with the name of cities [Milwaukee, Seattle, Minneapolis] and another list with the cities’ corresponding populations [30, 45, 15].
I want to print the name of the city with the highest population (I need the code to print ‘The city with the greatest population is Seattle’).
>Solution :
cities=["Milwaukee", "Seattle", "Minneapolis"]
population=[30, 45, 15]
print (cities[population.index(max(population))])