Αποτελέσματα Αναζήτησης
20 Δεκ 2016 · You can use pycountry to get a list of all the countries: pip install pycountry . Or you can use this dictionary: Country = [ ('US', 'United States'), ('AF', 'Afghanistan'), ('AL', 'Albania'), ('DZ', 'Algeria'),
21 Δεκ 2017 · >>> pycountry.countries.lookup('Bolivia') Country(alpha_2='BO', alpha_3='BOL', common_name='Bolivia', name='Bolivia, Plurinational State of', numeric='068', official_name='Plurinational State of Bolivia')
5 Μαΐ 2024 · Country Lookup. Countries are identified by name, 2-letter code (ISO 3166-1 alpha-2) or 3-letter code (ISO 3166-1 alpha-3). All identifiers are matched case-insensitively. Names are matched with regular expressions that are stored in the JSON data.
31 Μαΐ 2024 · >>> country = pycountry. countries. lookup ('de') >>> dict (country) {'alpha_2': 'DE', 'name': 'Germany', ...} Custom Countries. While pycountry will not be adding non-ISO values to its standard library, you can add or remove entries at runtime to fit your needs. Add a non-ISO country:
10 Ιαν 2023 · The pycountry.countries method returns the information of countries like: alpha_2; alpha_3; flag; name; numeric; Use pycountry.countries in example: import pycountry # 👉️ Import module countries = pycountry.countries # 👉️ Get All World Countries info for country in countries: print(country) The output:
11 Αυγ 2023 · PyCountry is a Python library that provides functionalities related to ISO country codes and other country-related data. It is used to work with various standards established by the International...
The country converter (coco) is a Python package to convert country names into different classifications and between different naming versions. Internally it uses regular expressions to match country names. Installation. The package is available as PyPI, use. pip install country_converter -upgrade.