From ea1cdb99018b6c8934bc88ddfee8a088ccdb4649 Mon Sep 17 00:00:00 2001 From: Aditya Gupta <95540416+iadi37@users.noreply.github.com> Date: Sat, 15 Apr 2023 23:10:23 +0530 Subject: [PATCH] update pycountry We can get the required ISO data by giving the code like 'SE'(Sweden) and 'AF'(Afghanistan) and putting in alpha_2. Please recheck and verify if I am correct. --- pyCountry.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pyCountry.py b/pyCountry.py index 22b833a..7def9f8 100644 --- a/pyCountry.py +++ b/pyCountry.py @@ -1,10 +1,15 @@ -import pycountry +from pycountry import countries -countr = {} +print(countries.get(alpha_2='DE')) -t = list(pycountry.countries) -for country in t: - countr[country.alpha2] = country.name +#import pycountry -print countr +#countr = {} + +#t = list(pycountry.countries) + +#for country in t: + #countr[country.alpha2] = country.name + +#print countr