String Swap Case in Python
Use the swapcase() method to transform the upper case characters into a lower case and vice versa. regular_text = "This IS a reguLar text." swapped_case_text = regular_text.swapcase() print(regular_text) #This IS a reguLar text. print(swapped_case_text) #tHIS is A REGUlAR TEXT. Notice…