#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()