A simple Python program to lookup the full country name (and other details) from country code. You can also look up timezones, capital, etc from this.
- Download this Gist from GitHub
- Save as countryinfo.py
After that, use this Python code in the same directory as countryinfo.py:
import countryinfo countries = countryinfo.countries countryCode = "US" for country in countries: if country['code'] == countryCode: countryName = country['name'] print countryName
As you can see, the Gist has more than just the country name, so you could look up other info related to the country, such as timezone, capital, etc.