1👍
This is an example of how you can use pycountry:
import pycountry
def cities_in_country(country):
list_ = []
for region in pycountry.subdivisions.get(country_code=country):
list_.append(region.name)
return list_
print(cities_in_country("FR"))
👤fed
Source:stackexchange.com