Copyright © tutorialspoint.com
This method returns a copy of the string with only its first character capitalized. For 8-bit strings, this method is locale-dependent.
str.capitalize() |
Here is the detail of parameters:
NA
It returns a copy of the string with only its first character capitalized
#!/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!!! |
Copyright © tutorialspoint.com