手机号运营商判断
phone1_3=int(phone1[:3]) if not phone1.isdigit(): print("非法输入") else: if len(phone1)!=11: print("非法输入") else: if phone1_3>=130 and phone1_3<=150: print(str(phone1_3)+"移动") elif 151<=int(phone1[:3])<=170: print(phone1[:3]+"联通") elif 171 <= int(phone1[:3]) <= 199: print(phone1[:3]+"电信") else: print("未知运营商")