file = open(‘testfile.txt‘, ‘w‘) file.write(‘Hello World\n‘) file.write(‘This is our new text file\n‘) file.write(‘and this is another line.‘) file.close() content = open(‘testfile.txt‘, ‘r‘).read() print(content)