question you have been given a string s consisting of uppercase and lowercase english alphabets you need to change the case of each alphabet in this string that is all the uppercase letters should be converted to lowercase and all the lowercase letters should be converted to uppercase you need to then print the resultant string to output source hackerearth sample input abcde sample output abcde method 1 method 2 method 1 method 2
def toggle_string_1(string):
    return string.swapcase()

def toggle_string_2(string):
    toggle_string=''
    for s in string:
        if s.isupper():
            toggle_string+=s.lower()
        elif s.islower():
            toggle_string+=s.upper()
        else:
            toggle_string+=s
    return toggle_string

string=input()


print(toggle_string_1(string)) 

print(toggle_string_2(string))