You may need to read text files and do some formatting of those strings.
With formatting, it means that you may also need to replace a certain portion of the string with another string.
Let us assume that we have a sentence and want to replace all the occurrences of the word i with I.
To do that, we are not going to rely on some heavy regular expression, but use the method replace()
sentence = "i can learn programming and journaling"
To do that replacement, we can just call the method replace():
sentence.replace("i", "I")
That’s basically it.
I hope you find this useful.