Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Doc/library/stdtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1759,7 +1759,14 @@ expression support in the :mod:`re` module).
.. method:: str.capitalize()

Return a copy of the string with its first character capitalized and the
rest lowercased.
rest lowercased. For example::

>>> 'PYTHON IS AMAZING'.capitalize()
'Python is amazing'
>>> 'Njemačka starts With a non-ASCII digraph'.capitalize()
'Njemačka starts with a non-ascii digraph'

See also :meth:`title`.

.. versionchanged:: 3.8
The first character is now put into titlecase rather than uppercase.
Expand Down
Loading