The capitalize( ) Function is used to convert the first letter of the String to uppercase.
x = "hello beautiful world" y = x.capitalize() print(y)
In the above code, we have declared a String 'hello beautiful world'.
Then we have used the 'capitalize( )' function to convert the first letter of the String to uppercase.
And assign to variable 'y'.
And, we print the value of 'y'.
And we got the below output.