Mar-12-2020, 01:51 PM
Hello everyone
I am trying to use phone-iso3166, phonenumbers and pycountries to create on the fly dictionaries of countries with the corresponding international phone code. Can anyone give me an example where I will input a country and I get the international phone code? Or at least where can I see all the attributes so that I can experiment?
I found this example
<code>
>>>from phone_iso3166.country import *
>>>phone_country(45)
'DK'
</code>
can anyone tell me how to do the exact opposite? Give the two or three (even better for me) letter code for the country and get as output the international phone code?
Thank you in advance for the help
I am trying to use phone-iso3166, phonenumbers and pycountries to create on the fly dictionaries of countries with the corresponding international phone code. Can anyone give me an example where I will input a country and I get the international phone code? Or at least where can I see all the attributes so that I can experiment?
I found this example
<code>
>>>from phone_iso3166.country import *
>>>phone_country(45)
'DK'
</code>
can anyone tell me how to do the exact opposite? Give the two or three (even better for me) letter code for the country and get as output the international phone code?
Thank you in advance for the help