Capitalize() method –
The capitalize method converts the first character of a string to a uppercase letter and all the other characters to a lowercase letters.
In : s1 = "we love python" In : s1.capitalize() Out: 'We love python' In : s2 = "python is Awesome" In : s2.capitalize() Out: 'Python is awesome'
When we use the capitalize method, it does not change the original string. It remains as it is.
In : s1 Out: 'we love python' In : s2 Out: 'python is Awesome'