String Methods
swapcase()
Return a copy with uppercase and lowercase letters swapped.
str.swapcase()
Return a copy with uppercase and lowercase letters swapped.
Result
Returns
A new string with the case of each cased character reversed.
Run it
Try it
Run it and change it
text = "PyTHON" print(text.swapcase())
Output
Press Run to see what it prints.