微信小程序> Python一个简单的手机号注册后发送验证码的小程序

Python一个简单的手机号注册后发送验证码的小程序

浏览量:2103 时间: 来源:徐仕伟
def send_code():    input_number = input("Input Your Number:")    number_len = len(input_number)    CN_Mobile = ['134','135','136','137','138','139','150','151','152','157','158','159','182','183','184','187','188','147','178','1705']    CN_union = ['130','131','132','155','156','185','186','145','176','1709']    CN_telecom = ['133','153','180','181','189','177','1700']    if number_len == 11:        if input_number[0:3] in CN_Mobile:            print("Operator: China Mobile")            print("We're sending verification code via text to your phone:{}".format(input_number))        elif input_number[0:3] in CN_union:            print("Operator: China Union")            print("We're sending verification code via text to your phone:{}".format(input_number))        elif input_number[0:3] in CN_telecom:            print("Operator: China Telecom")            print("We're sending verification code via text to your phone:{}".format(input_number))        else:            print("No such a operator!")    else:        send_code()send_code()
小程序

版权声明

即速应用倡导尊重与保护知识产权。如发现本站文章存在版权问题,烦请提供版权疑问、身份证明、版权证明、联系方式等发邮件至197452366@qq.com ,我们将及时处理。本站文章仅作分享交流用途,作者观点不等同于即速应用观点。用户与作者的任何交易与本站无关,请知悉。

产品经理

手机 : 13312967497

擅长 : 小程序流量变现

扫码领取礼包

最新资讯

热门模板

  • 头条
  • 搜狐
  • 微博
  • 百家
  • 一点资讯
  • 知乎