| 1 | initial version |
Maybe you are looking for this solution:
import sys
sys.stdout = open('output.txt','w')
print('Hello!')
This way, you only have to use print to write to the file.
whit loves you. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.