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
18 changes: 16 additions & 2 deletions Doc/library/stdtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2792,8 +2792,22 @@ expression support in the :mod:`re` module).
.. method:: str.swapcase()

Return a copy of the string with uppercase characters converted to lowercase and
vice versa. Note that it is not necessarily true that
``s.swapcase().swapcase() == s``.
vice versa. For example:

.. doctest::

>>> 'Hello World'.swapcase()
'hELLO wORLD'

Note that it is not necessarily true that ``s.swapcase().swapcase() == s``.
For example:

.. doctest::

>>> 'straße'.swapcase().swapcase()
'strasse'

See also :meth:`str.lower` and :meth:`str.upper`.


.. method:: str.title()
Expand Down
Loading