Answer:
myfile = open("myfile","r").readlines();
myfile_altered = "".join(myfile.split("\\"))
length = len(myfile_altered)
myfile_sort = " ".join(myfile).split(" ")
myfile.sort()
print(length)
print(myfile)
Step-by-step explanation:
I read the file and split the text by a space, and just sorted the list using `.sort()`
Should work (didnt test it). If it doesn't, just comment on this answer and I will debug it.