Answers for "how to create and edit files 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 create and edit files python"

Python Answers by Framework

Browse Popular Code Answers by Language