You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
944 B
27 lines
944 B
import random
|
|
|
|
# def create_a_phone():
|
|
# # 第二位数字
|
|
# second = [3, 4, 5, 7, 8][random.randint(0, 4)]
|
|
# # 第三位数字
|
|
# third = {3: random.randint(0, 9),
|
|
# 4: [5, 7, 9][random.randint(0, 2)],
|
|
# 5: [i for i in range(10) if i != 4][random.randint(0, 8)],
|
|
# 7: [i for i in range(10) if i not in [4, 9]][random.randint(0, 7)],
|
|
# 8: random.randint(0, 9), }[second]
|
|
# # **后八位数字
|
|
# suffix = random.randint(9999999, 100000000)
|
|
# # 拼接手机号
|
|
# return "1{}{}{}".format(second, third, suffix)
|
|
#
|
|
# create_a_phone()
|
|
|
|
|
|
|
|
def raddomPhone():
|
|
headList = ["130", "131", "132", "133", "134", "135", "136", "137", "138", "139",
|
|
"147", "150", "151", "152", "153", "155", "156", "157", "158", "159",
|
|
"186", "187", "188", "189"]
|
|
return (random.choice(headList) + "".join(random.choice("0123456789") for i in range(8)))
|
|
|
|
|