How to print output of the python script into a text file i am new to sys module | Sololearn: Learn to code for FREE!
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

4th Sep 2018, 10:15 AM
Ashraf ali
Ashraf ali - avatar
2 Answers
+ 5
print('Hello World', file=your_file)
4th Sep 2018, 10:39 AM
Mert Yazıcı
Mert Yazıcı - avatar
4th Sep 2018, 10:29 AM
Paul
Paul - avatar