First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
The following works for me, although I have no idea why you would import future and use print() rather than just using write().
from __future__ import print_function
with open('spreader.txt','w') as spreader:
print("clan", "moiety", "distro", file=spreader, end="\r", sep = "\t")
The alternative would be:
with open('spreader.txt','w') as spreader:
spreader.write("\t".join(["clan", "moiety", "distro"]) + "\r")