For coding purpose please read this original Article How to trace mobile number and get information using python
Install the following python libraries for you to able to completely follow through this tutorial
pip install python-tk, phone-iso3166 , pycountry
We are going to use phone-iso3166 to determine the get alpha_2 letters of the country from the number and pycountry to determine the official name of the country using alpha_2 letters we obtained from phone-iso3166.
from phone_iso3166.country import phone_country
code = phone_country("255757295721")
pycountry.countries.get(alpha_2 = code)
Country(alpha_2='TZ', alpha_3='TZA', common_name='Tanzania', name='Tanzania, United Republic of', numeric='834', official_name='United Republic of Tanzania')