I have written some code which opens and reads from a file, input.txt, in a loop. I now want to take each word from the first file, and write it to a new file like so.