YouTip LogoYouTip

Python3 String Capitalize

# Python3.x Python3 capitalize() Method [![Image 3: Python3 Strings](#) Python3 Strings](#) * * * ## Description The Python capitalize() method converts the first character of a string to uppercase and the rest to lowercase. ## Syntax The syntax for the capitalize() method is: str.capitalize() ## Parameters * None. ## Return Value This method returns a string with the first character capitalized. ## Example The following example demonstrates the use of the capitalize() method: ## Example #!/usr/bin/python3 str="this is string Example From ....wow!!!" print("str.capitalize() : ",str.capitalize()) The output of the above example is: str.capitalize() : This is string example from ....wow!!! * * Python3 Strings](#)
← R Calculate The Most ElementR Func Mean β†’