New course! Every coder should learn Generative AI!
Try a free lesson+ 1
How to print output of the python script into a text file i am new to sys module
2 Answers
+ 5
print('Hello World', file=your_file)
+ 2
It is explained in this lesson:
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2447/