python学习笔记
用python随机生成500个中国移动手机号
# -*- coding:utf-8 -*-
import_random
number_list=[]
number=str(random.randint(135,139)+str(random,randint(10000000,99999999)))
count=0
while count<=500:
if numbernot in number_list:
number_list.append(number)
count+=1
fp=open("d:\\a.txt","w")
for numin number_list:
fp.write(num+"n")
fp.close()