1. 程式人生 > >python批量生成手機號

python批量生成手機號

# -*- coding: utf-8 -*-
__author__ = 'Administrator'
__time__ = '2018-05-07 下午 4:20'
import string
import random
f=open('d:\phone_num.txt','w',encoding='utf-8')
def phone_num(num):

   num_start = ['1781']

Mobile = []

for i in range(18018000000,18018999999,1):
  Mobile.append(i)
  f=open('d:\phone_num.txt','w',encoding='utf-8')
   
for i in Mobile:
     f.write(str(i) + "\n")
    
     print(str(i))
f.close()