#批量创建txt文件
import sys,os
a=open("demo.txt")
n=0
aList=[]
for line in a.readlines():
aList.append(str(line.strip('\n')))
print aList
for i in aList:
os.system('@echo > %s.txt'%i)
转载于:https://www.cnblogs.com/51testing/p/6371193.html
#批量创建txt文件
import sys,os
a=open("demo.txt")
n=0
aList=[]
for line in a.readlines():
aList.append(str(line.strip('\n')))
print aList
for i in aList:
os.system('@echo > %s.txt'%i)
转载于:https://www.cnblogs.com/51testing/p/6371193.html