How can I add horizontal-space in between columns, when using python to append several lists onto a file? -


for item in zip(xcoords, ycoords, zcoords):       out = open("file.txt", "a")       print (item)       out.write( "ar" "%s %s %s \n" %(item))       out.close() 

i want 4 columns separate each other. code prints,

ar123    ar213    ar312 

have tried adding space this:

    item in zip(xcoords, ycoords, zcoords):     out = open("file.txt", "a")     print (item)     out.write( "ar" " " "%s " " %s " " %s \n" %(item))     out.close() 

note added space putting " " in between.


Comments

Popular posts from this blog

tcpdump - How to check if server received packet (acknowledged) -