Python - String Method - capitalize() Tutorial
It converts the first character of the string to uppercase and the rest of the remaining characters to lowercase. It does not modify the original string.
str1 = "welcome to fresherbell PYTHON tutorial"
print(str1.capitalize())
print(str1)
Output-
Welcome to fresherbell python tutorial
welcome to fresherbell PYTHON tutorial
In the above program "welcome" is converted to "Welcome" and "PYTHON" is converted to "python". But, it does not modify the original string.