Simple script for
- generating random city name (any country)
- generating random country name
- generating random city from of country
- generating random location (country and city)
import rcoc
print("Random city: ", rcoc.get_random_city())
rand_country = rcoc.get_random_country()
print("\nRandom country: ", rand_country)
print("Random {0} city: {1}".format(rand_country, rcoc.get_random_city_by_country(rand_country)))
print("\nRandom location: ", rcoc.get_random_location())
Random city: Gagliano Aterno
Random country: Bolivia
Random Bolivia city: Reyes
Random location: Annecy-le-Vieux, France
Getting list of all countries as list:
all_countries = rcoc.get_all_countries()