name = 'India'
country = CountryInfo(name)

data1 = country.alt_spellings()
print(data1)

data2 = country.capital()
print(data2)

data3 = country.currencies()
print(data3)

data4 = country.languages()
print(data4)

data5 = country.timezones()
print(data5)

data6 = country.area()
print(data6)

data7 = country.borders()
print(data7)

data8 = country.calling_codes()
print(data8)

data9 = country.wiki()
print(data9)

data10 = country.info()
def get_timezone_by_country(country):
    country = CountryInfo(country)
    return country.timezones()
Beispiel #3
0
    print(name, end=', ')

country_capital = country.capital()
print(f'\n\nCapital:\n{country_capital}')

country_currency = country.currencies()
print('\nCurrency:')
for currency in country_currency:
    print(currency, end=', ')

country_lang = country.languages()
print('\n\nLanguages:')
for languages in country_lang:
    print(languages, end=', ')

country_timezone = country.timezones()
print('\n\nTime-Zone:')
for timezones in country_timezone:
    print(timezones, end=', ')

country_area = country.area()
print(f'\n\nCountry Area:\n{country_area}')

country_borders = country.borders()
print('\nBorders:')
for border in country_borders:
    print(border, end=', ')

calling_codes = country.calling_codes()
print('\n\nCall Code:')
for call_code in calling_codes: