sWAP cASE

  • + 0 comments

    Python has a built in string function for this:

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