我正在尝试获取电话号码的运营商
我在 python 中使用电话号码并不断收到此错误
‘str’ object has no attribute ‘country_code’
这是我的代码:
import phonenumbers
num = input("phone number")
from phonenumbers import carrier
Carrier = carrier.name_for_number("+1" + num, "en")
print(Carrier)
