Answers for "swap case hackerrank solution"

0

swap case hackerrank solution

def swap_case(s):
    for i in range (len(s)):
        if s[i].isupper():
             return s[i].lower()
        elif s[i].islower():
            return s[i].upper()
        else:
            return s[i]
s=input()
swap_case(s)
print("".join(map(swap_case,s)))
Posted by: Guest on April-16-2020

Code answers related to "swap case hackerrank solution"

Python Answers by Framework

Browse Popular Code Answers by Language