sWAP cASE

  • + 1 comment

    Python has a built in string function for this:

    def swap_case(s):
        return s.swapcase()