Learnerslesson
   JAVA   
  SPRING  
  SPRINGBOOT  
 HIBERNATE 
  HADOOP  
   HIVE   
   ALGORITHMS   
   PYTHON   
   GO   
   KOTLIN   
   C#   
   RUBY   
   C++   




title( ) FUNCTION


title( ) Function


The title( ) Function is used to convert all the first letter of the words in the String, with an uppercase letter.


Example :


x = "hello beautiful world"
y = x.title()
print(y)


Output :



  Hello Beautiful World

In the above code, we have declared a String 'hello beautiful world'.


x = "hello beautiful world"

java_Collections

Then we have used the 'title( )' function to convert all the first letter of the words of the String in uppercase.


y = x.title( )

And assign to variable 'y'.


java_Collections

And, we print the value of 'y'.


print(y)

And we got the below output.


Hello Beautiful World