I have a long list of strings containing names of cities or countries. The list also contain some names of countries that does not exist anymore like Prussia or the Ottman Empire.

l= [
'Russia',
'Smolensk',
'Moscow',
'Moscow',
'France',
'France',
'Russia',
'Prussia',
'Austria',
'Sweden',
'Constantinople',
'Russia',
'Great Britain',
'Spain',
'Portugal',
'Germany',
'Frankfurt',
'France',
'Leningrad',
'Paris',
'DDR',
'Paris',
'France',
'Paris',
'the United States',
'St. Helena',
]

I want to split that list into two l_countries and l_cities. One containing the cities names, and another containing country names.

I think the difficulty is to detect old-city and old-country names?

Like:

  • Prussia (does not exist anymore)
  • The DDR (does not exist anymore)
  • Yugoslavia (does not exist anymore)
  • Constantinople (now Istanbul)
  • Leningrad (now Saint Petersburg)
0

There are 0 best solutions below