Reputation: 81
Is it possible to identify the country code number by language?
It would look something like this:
>>> lang = 'en'
>>> print(lang.country_code)
>>> '+1'
I searched the phonenumbers
and pycountry
libs, but I couldn't find anything like that.
Upvotes: 1
Views: 708
Reputation: 103
You can create a dictionary here with country code like dict ={ "country1": 1234, "country2": 234, "country3": 1964 } and then wherever you want to use it, you can run loop to print the key value using key.
Upvotes: 0
Reputation: 345
I found a JSON containing the requirements of your question, you'll just have to write some code to get the right values from it.
Upvotes: 2