Question: once upon a time in a land far away there was a village where the people lived in harmony with nature. they cultivated their land
once upon a time in a land far away there was a village where the people lived in harmony with nature. they
cultivated their land with care and treated every living being with respect every morning. they woke up to the
melodious chirping of birds and the soothing sound of the river thlat flowed by their village the children played
freely in the meadows and everyone knew each other by name. it was a simple yet fulfilling life away from the chaos
of the outer world as the sun set the village would light up with lanterns and the sound of laughter and music
would fill the air under the starlit sky they shared stories of the days gone by and dreams of the
future it was indeed a magical place where every day was a celebration of life and togetherness.
Part : Programming Questions: String Manipulation pts
Read the paragraph from the file named story.txt Then, perform the following operations: Split the string in story.txt into individual sentences.Code in PYTHON
Remove any leading or trailing spaces from each sentence.
Convert each sentence to start with a capital letter and end with a period.
Combine these sentences back into a single string, separated by a space.
Write it into another file named newstory.txt
For example, if the content is hello world. python is fun. i like to code.", the output string should be "Hello world. Python is fun. I like to code."
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
