sWAP cASE

  • + 0 comments
    def swap_case(s):
        txt = ""
        for char in s:
            if char.isupper():
                txt += char.lower()
            else:
                txt += char.upper()
        return txt