Coding_tuts

Python Write in file and read from file

Python Write in file and read from file

file open("yourfilename.txt", "a")

file.write(  str(your_variable))

file.close()

file = open("youfilename.txt", "r")

print(file.read())

How do you rate this article?

1



Coding_tuts
Coding_tuts

Programming tutorials

Publish0x Publish0x

Reward the author with $0.01 in crypto, and earn yourself as you read!

20% to author / 80% to me.
Rewards are FREE. Publish0x pays them, not you.

Page not displaying correctly?