Python write list to file. write() will write a single line to a file.