The parse function is used to process that number. Next, we are giving phone numbers with country code as input to the ph_number variable. Geocoder is used for retrieving country names according to phone number code. From phonenumbers, we are importing geocoder. Here we are importing phonenumbers as pn. Print(scription_for_number(ph_number,"en")) #printing the asscociated country with phone number Ph_number=input("Enter Phone number with Country code: ") Next, we are going to import that module and we are going to use some functions of it. We can do this by using the pip command as shown below. Phonenumbers module is used for finding basic information of phone number, carrier, region, etc.įor this first, we have to install this module to our system. let’s see how it works.įor finding the country respective to their phone number attached with the phone code we are going to use the python module called phonenumbers. In this tutorial, we are going to learn how can we Find the country of a phone number from the country code in Python. It’s very simple and easy just a few lines of code.
0 Comments
Leave a Reply. |