Python String capitalize() Method
Advertisements
It returns a copy of the string with only its first character capitalized.
Syntax
str.capitalize()
Parameters
NA
Return Value
string
Example
Live Demo#!/usr/bin/python str = "this is string example....wow!!!"; print "str.capitalize() : ", str.capitalize()
Result
str.capitalize() : This is string example....wow!!!
python_strings.htm
Advertisements