The replace method comes handy when you want to replace a word with another word in a given string.
The capitalize function capitalises the given sentence:
Your session expired. Please sign in again to continue.