Answers for "swap case logic]"

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
2

swapcase

str_swapcase = "what was that about?".swapcase()
print(str_swapcase)
Posted by: Guest on June-27-2020

Python Answers by Framework

Browse Popular Code Answers by Language