结果显示是这样的。我尝试了of方法,无论它似乎无法向上移动。先感谢您
- 无论如何,法院阵列是否可以向上移动?
- 还是我应该直接删除该行
if __name__ == '__main__': #start of program
master = Tk()
newDirRH = "C:/VSMPlots"
FileName = "J123"
TypeName = "1234"
Field = [1,2,3,4,5,6,7,8,9,10]
Court = [5,4,1,2,3,4,5,1,2,3]
Field = "\n,,".join(str(x) for x in Field) # to leave a line in each Field array
Court = "\n,,,".join(str(y1) for y1 in Court) # to leave a line in each Court array
stringText = "Name, Type, Field, Court\n" + str(FileName) + ',' + str(TypeName) + ',' + Field + '\n,,,' + Court
newfile = newDirRH + "/Try.csv"
text_file = open(newfile, "w")
x = stringText
text_file.write(x)
text_file.close()
print "Done"