Python String swapcase() method

The string.swapcase() method in Python returns a copy of the string with uppercase characters converted to lowercase and vice versa.

Syntax

Parameter

NA

Return

This method returns a copy of the string with uppercase characters converted to lowercase and vice versa.

Example 1

Output

Example 2

Output

Pin It on Pinterest

Share This