how to swapcase in python code example
Example 1: code to swap in python
a=5
b=10
a,b=b,a #swapped
Example 2: swapcase
str_swapcase = "what was that about?".swapcase()
print(str_swapcase)
Example 3: swapping upper case and lower case string python
# swapcase() method
string = "thE big BROWN FoX JuMPeD oVEr thE LAZY Dog"
print(string.swapcase())
>>> THe BIG brown fOx jUmpEd OveR THe lazy dOG