import randomdef generate_mobile(): """随机生成一个手机号码。。1[3,5,8,]+9""" phone = '1'+random.choice(["3","5","8"]) for i in range(9): num = random.randint(1,9) phone+= str(num) return phone 来源:https://www.cnblogs.com/wz123/p/12517512.html 标签 手机