ID EN
Built-in Types

swapcase

Python 3.11

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.

Syntax

PYTHON
str.swapcase()