标签:python python3
#生成十个文件从1M到10M
for i in range(1,11):
with open(str(i)+"M.txt","w") as f:
f.write(i*1024 * 1024 * ‘0‘)
生成指定大小文件用于测试
原文地址:http://yaohuayong.blog.51cto.com/2461805/1910333