Python Basics
Python Advanced
Python Useful References
Python Useful Resources
Selected Reading
© 2011 TutorialsPoint.COM
|
Python String capitalize() Method
Description:
This method returns a copy of the string with only its first character capitalized. For 8-bit strings, this method is locale-dependent.
Syntax:
Parameters:
Here is the detail of parameters:
Return Value:
It returns a copy of the string with only its first character capitalized
Example:
#!/usr/bin/python
str = "this is string example....wow!!!";
print "str.capitalize() : ", str.capitalize()
|
This will produce following result:
str.capitalize() : This is string example....wow!!!
|
|
|
|