We have many built-in string methods in python.
One such string method is swapcase()
, which allows you to convert every lower case letter of a string to upper case letter and vice versa.
s = 'HELLOWORLD'print(s.swapcase())s = 'helloworld'print(s.swapcase())