批量数列生成

admin 2016年9月22日11:12:31Python评论2,344 次浏览阅读模式
#coding:utf8
for i in range(1,50000,1):
if len(str(i))<10:
i='0'*(10-len(str(i)))+str(i)
f =open('sn.txt','a')
print i
print >>f,i
f.close()
else:
print i
print 'over!'

相关文章
weinxin
我的微信
微信扫一扫
admin
  • 本文由 发表于 2016年9月22日11:12:31
  • 转载请务必保留本文链接:https://anyun.org/a/jishuguanzhu/bianchengchalou/python/2016/0922/6225.html

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: