Introfor

[hackerRank]sWAP cASE 본문

Doing/Python

[hackerRank]sWAP cASE

YongArtist 2021. 3. 5. 19:12
def swap_case(s):
    output = ''
    for char in s:
        if char.islower():
            output += char.upper()
            continue
        output += char.lower()
    return output

if __name__ == '__main__':
    s = input()
    result = swap_case(s)
    print(result)

eASY

 

Comments