How to list to column file
k = [74.33333333333333, 66.66666666666667, 42.666666666666664, 60.333333333333336, 53.333333333333336] with open('D:\\py\\4.txt', 'w') as ouf: for j in k: ouf.write(str(j)\n) Without \n prints everything on one line, appends \n and - SyntaxError: invalid syntax