worldfinder.get_capital

Functions

get_capital(country)

Retrieve the capital city of a given country.

Module Contents

worldfinder.get_capital.get_capital(country)[source]

Retrieve the capital city of a given country.

Parameters:

countrystr

The country in which the user wishes to find the capital city

Returns:

str

The capital city corresponding to the country passed

Examples:

get_capital(“Italy”) ‘Rome’