python写文件脚本

#!/usr/bin/python
import random
file_object = open('file_01.txt','w')
x=1
while x<=1000000:
text=random.randint(1, 100000000)
file_object.write(str(text)+'\n')
x+=1
file_object.close()

 

posted @ 2011-12-19 12:30  notedd  阅读(156)  评论(0编辑  收藏  举报