worldfinder.check_city
Functions
|
Returns boolean on whether a given city is present in the given country |
Module Contents
- worldfinder.check_city.check_city(city, country)[source]
Returns boolean on whether a given city is present in the given country
- Parameters:
city (str) – The name of a city
country (str) – The name of a country
- Returns:
boolean – True if the given city name is a city in the given country
Raises
——-
TypeError – If city or country are not a string.
ValueError – If city or country contain an empty string OR If city is not a valid city OR If country is not a valid country
Examples
>>> checkCity("London", "Canada") True