x
for eachFile in os.listdir(savePath): j = eachFile.strip(".tx") with open('tmp/'+j+".txt", "a") as myfile: for i in (0, len(x)): if i < len(x): myfile.write(str(x[i])) if i == len(x): myfile.write(str(x[i])+"/n")
Traceback (most recent call last): File "C:/XXXX.py", line 322, in <module> myfile.write(str(x[i])+"/n") IndexError: list index out of range
len(x)
for i in (0, len(x)-1):
for eachFile in os.listdir(savePath): j = eachFile.strip(".tx") with open('tmp/'+j+".txt", "a") as myfile: for i in (0, len(x)-1): myfile.write(str(x[i])) myfile.write("/n")
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)