Project Brief
This text file here contains a fairytale. However, the author used lowercase letters at the beginning of every sentence. Fix that with Python. Write a Python script that converts the first letter of every sentence into uppercase, thus respecting the grammar rules. The corrected text should be saved in a new text file.
Environment Setup Instructions
You don’t need to install any library for this project.
Place the text file and the main.py file in the same directory and run with python main.py
Resources
You don’t need to use any third-party library for this. You can use built-in string methods.
Learn how to use the str.split() method here:
https://docs.python.org/3/library/stdtypes.html#str.split
Learn how to use the str.capitalize() method here:
https://docs.python.org/3/library/stdtypes.html#str.capitalize
Project Solution
View, run, and play around with the code using the button below, even from your mobile phone.
Feel free to post your questions or comments in the comment section below.
Happy Coding!
Daily Python Projects Team