Get Info of Phone Number using Python With Source Code

Hello Curious Coders,
In this project we are going to work on another python predefined library named “phonenumbers” which helps us to extract the information of a phone number like carrier(service provider name) , region it belongs to etc,.Let’s get into it…
Source Code :
import phonenumbers
from phonenumbers import carrier, geocoder, timezone
mobileNo=input("Enter Phone number with country code(+xx xxxxxxxxx):")
mobileNo=phonenumbers.parse(mobileNo)
if phonenumbers.is_valid_number(mobileNo):
print('Phone Number belongs to region :',timezone.time_zones_for_number(mobileNo))
print('Service Provider : ',carrier.name_for_number(mobileNo,"en"))
print('Phone number belongs to country : ',geocoder.description_for_number(mobileNo,"en"))
else:
print("Please enter valid mobile number")
Output :

Code Explanation:
- First we installed phonenumbers package in our local system.
- Next we import installed package
- Later we have taken input as mobile number from user and parsed throug it.
- Then we checked whether the mobile number is valid or not. If valid we extracted information about it and displayed on the console.
Find More Projects
Drawing Chhatrapati Shivaji Maharaj Using Turtle in Python Chhatrapati Shivaji Maharaj, the legendary Maratha warrior and founder of the Maratha Empire, is …
Resume Builder Application using Java With Source Code Graphical User Interface [GUI] Introduction: The Resume Builder Application is a powerful and user-friendly …
Encryption Tool using java with complete source Code GUI Introduction: The Encryption Tool is a Java-based GUI application designed to help users …
Movie Ticket Booking System using Java With Source Code Graphical User Interface [GUI] Introduction: The Movie Ticket Booking System is a Java …
Video Call Website Using HTML, CSS, and JavaScript (Source Code) Introduction Hello friends, welcome to today’s new blog post. Today we have …
promise day using html CSS and JavaScript Introduction Hello all my developers friends my name is Gautam and everyone is welcome to …