Python String capitalize() Method

The capitalize() method is used to make the first letter of a string capitalized and the rest characters in lowercase. The method do not change the original string instead create a copy of string with first character capitalized and rest of all other characters lowercase.

Syntax:

String_var.capitalize ()

This method accepts no parameter.

Return Value: A copy of the string in which the first character is capitalized, and the rest characters are lowercase.
			

# Python example of the capitalize() method
website = "tutorials nation"
print(website.capitalize())
 
				

Output:

Tutorials nation