📅  最后修改于: 2022-03-11 14:46:05.527000             🧑  作者: Mango
# install package:
pip install phonenumbers
# code:
import phonenumbers
from phonenumbers import geocoder
from phonenumbers import carrier
number = '+XXXXXXXXXX'
ch_number = phonenumbers.parse(number, "CH")
print(geocoder.description_for_number(ch_number, "en"))
service_provider = phonenumbers.parse(number, "RO")
print(carrier.name_for_number(service_provider, "en"))