So I've been working on this code and I'm trying to make it so that what I write will change the code's result.
import phonenumbers
from phonenumbers import geocoder
from phonenumbers import carrier
phone_number1 = phonenumbers.parse("+12123456789")
print(phone_number1)
print(geocoder.description_for_number(phone_number1,'en'))
print(carrier.name_for_number(phone_number1,'en'))
phone_number2 = phonenumbers.parse("+12123456789")
print(geocoder.description_for_number(phone_number2,'en'))
The result I get depends on what I write in the phonenumber.parse()
but I can't figure out how to make it what I input change that phonenumber.parse()
, example:
What is your phone number?
+12123456789
and that makes the phonenumber.parse()
become phonenumber.parse("+12123456789")
There's probably a very simple answer to this which I'm just not seeing...
This is most likely very poorly explained so any type of help would be useful :)
question from:
https://stackoverflow.com/questions/65938773/how-do-i-change-the-code-to-whatever-i-input 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…