This is python problem can you please explain to me this is for study guide Writ
ID: 3604751 • Letter: T
Question
This is python problem can you please explain to me this is for study guide
Write a program 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'tThenGoInThroughTh
eWindow
WhenInDoubt,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
Explanation / Answer
Solution:
sentence.txt:
Output:
newSentence.txt:
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.