How to use Python string capitalize method

string capitalize function

capitalize method allows us to format a string by making the first letter upper case. It has the following syntax.

s.capitalize()

s = "java2s.com"
print s.capitalize() 

The code above generates the following result.





















Home »
  Python »
    Data Types »




Data Types
String
String Format
Tuple
List
Set
Dictionary