I try to get the country id when I give the country's name.
import pycountry
pays = "france"
initales_pays = pycountry.countries.search_fuzzy(pays)
print(initales_pays)
And the result is
[Country(alpha_2='FR', alpha_3='FRA', name='France', numeric='250', official_name='French Republic')]
How can I take the alpha_2
?
pycountry
about this? – mkrieger1