Question: Write a program in python splitter that reads a text file sentences.txt line by line and creates a new file that contains all original lines

 Write a program in python splitter that reads a text file

Write a program in python splitter that reads a text file sentences.txt line by line and creates a new file that contains all original lines changed. The original lines are strings where each line is a sentence in which all of the words are run together but the first character of each word is uppercase. The new version printed to a file changes the sentence so that the words are separated by spaces and only the first word starts with an uppercase letter. For example, if sentences.txt contains StopAndSmellTheRoses WhenADoorClosesAnotherDoorShouldOpenButifitDoesn'tThenGolnT hrough l heWindoW WhenlnDoubt,Mumble then the new file contains Stop and smell the roses When a door closes another door should open but if it doesn't then go in through the window When in doubt, mumble

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!