Reading about Python? Actually practice it. Try PyChallenge free

Python Tutorial

String capitalize

The method capitalize returns a new string with first letter capitalized.

Syntax

The format is:
str.capitalize()

Parameters

None.

Example

str = "the capitalize method returns the string with first letter capitalized."
print( str.capitalize() )

Result:

The capitalize method returns the string with first letter capitalized.
BackNext

Practice
Stop reading. Start writing Python.
PyChallenge gives you interactive exercises in your browser — no install needed.
Practice Python with interactive exercises