Answers for "how to make changes to text files by python"

1

how to veiw and edit files with python

#write
f = open('helloworld.txt','wb')
f.write('hello world')
f.close()

#read
f = open('helloworld.txt','r')
message = f.read()
print(message)
f.close()
Posted by: Guest on June-12-2020

Code answers related to "how to make changes to text files by python"

Python Answers by Framework

Browse Popular Code Answers by Language