Answers for "print console sys.stdout"

1

print console sys.stdout

sys.stdout = open("test.txt", "w")

print("Hello World")

sys.stdout.close()
# TEST.TXT:
# Hello World
Posted by: Guest on March-03-2021

Python Answers by Framework

Browse Popular Code Answers by Language