Python String – swapcase() method

It is a method in python that swaps the cases of all the alphabets i.e. concerts all the upper case characters to lower case and all the lower case characters to upper case. Syntax: string.swapcase() Example 1: s = “CODE, hustle” x = s.swapcase() print(x) Output: code, HUSTLE Explanation: Here “CODE” is converted to “code” […]

Python String – swapcase() method Read More »