swapcase() - Swaps cases, lower case becomes upper case and vice versa

Swaps lowercase characters for uppercase characters, and vice versa.

Example

Python
str = 'Hello World!'
print(str.swapcase())

Output

hELLO wORLD!