Question: PYTHON What do I have to add to this programm so that it reads a file word by word and sorts the words alphabetically in
PYTHON
What do I have to add to this programm so that it reads a file word by word and sorts the words alphabetically in a new file (each word in the new file must be in a different line).

origin = open(input("Text file of origin:"),"r") newfile = open(input("Nex text file with the words sorted :"), "w") for line in origin: for word in line.split(): newfile.write(word) newfile.close() origin.close()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
