Coders Packet

GET PHONENUMBER DETAILS USING PYTHON

By pappala adithya

Python is widely used language and it is free open source language -> With Phonenumbers package we will easily identify the details of particular person , it is very useful for in future

import phonenumbers
from phonenumbers import carrier,geocoder,timezone
mobilenum=input("Enter mobile number with country code:")
mobilenum=phonenumbers.parse(mobilenum)

#GET TIMEZONE OF PHONENUMBER
print(timezone.time_zones_for_number(mobilenum))


#GETTING CARRIER OR SERVICE OF PHONENUMBER
print(carrier.name_for_number(mobilenum,"en"))


#GETTING REGION INFORMATION
print(geocoder.description_for_number(mobilenum,"en"))

#VALIDATING A PHONENUMBER
print("Valid Mobile Number:",phonenumbers.is_valid_number(mobilenum))


print("Checking possibility of numbers:",phonenumbers.is_possible_number(mobilenum))

 

 

 

output

 

Download Complete Code

Comments

No comments yet