Ask Your Question

Revision history [back]

click to hide/show revision 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")