Python file write operations.
Program in Python to open and write file
This program writes to the file specified with-
file_to_write = open('test_write.txt', 'w')
file_to_write.write('Text to write')
file = write_file(open('test_write.txt', 'w'))
Now lets make the file writes to be more interesting