Python_ Search Phone Provider

Source: Internet
Author: User

1 defseach_phone_nmuber_operator ():2Cn_mobile = [134,135,136,137,138,139,150,151,152,157,158,159,182,183,184,187,188,147,178,1705]3Cn_union = [130,131,132,155,156,185,186,145,176,1709]4cn_telecom = [133,153,180,181,189,177,1700]5 6PHONE_NMU = input ('Please enter the phone number to be queried:')7QC_RD = Phone_nmu[0:3]8     ifLen (PHONE_NMU) = = 11:9         ifphone_nmu.isdigit ():Ten             ifInt (QC_RD)inchCn_mobile: One                 Print("The phone number you entered is:", PHONE_NMU) A                 Print("Supplier: China Mobile \ n") -             elifInt (QC_RD)inchcn_union: -                 Print("The phone number you entered is:", PHONE_NMU) the                 Print("Supplier: China unicom \ n" ) -             elifInt (QC_RD)inchcn_telecom: -                 Print("The phone number you entered is:", PHONE_NMU) -                 Print("Supplier: China Telecom \ n") +             Else: -                 Print("the phone number segment you entered is not correct, please re-enter \ n") +         Else: A             Print("Invalid phone number, enter the phone number must be 11 digits \ n") at     Else: -         Print("Invalid phone number, please enter a 11-digit phone number \ n") -i = 1 -      whilei >0: - Seach_phone_nmuber_operator () -Seach_phone_nmuber_operator ()

Python_ Search Phone Provider

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.