sWAP cASE

  • + 0 comments

    def swap_case(s):

    new_s = ''
    for i in s:
        if i.isupper():
            new_s += i.lower()
        elif i.islower():
            new_s += i.upper()    
        else:
            new_s += i   
    
    return new_s