python create and edit text file code example
Example: 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()
#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()