#outfile = open('writing_example.txt', 'a') ''' outfile.write('This is some text.\n') outfile.flush() outfile.write("This is more text.") ''' #outfile.write('Here is more text.\n') #outfile.close() infile = open('writing_example.txt', 'r') contents = infile.read(6) print(contents) contents = infile.read(4) print(contents) print(infile.read()) infile.seek(0) print(infile.read()) infile.close() infile = open('writing_example.txt', 'r') print(infile.read()) infile.close()