String Functions in Python
In python there are so many inbuild functions for String Operations. All the functions returns new values. They do not change the original values which is passed as a parameter.
capitalize() :
This function capitalize the first letter of the sentencs.
eg.
s1="hello How are you today. good morning"
s2= s1.capitalize()
print(s1)
print(s2)
s1="HELLO HOW ARE YOU ?"
print(s1)
print(s2)
Output