lower to upper and vice-versa

Sai_kiran_rachakonda · updated October 30, 2022
x = 'PrOgRaMM'
for i in x:
    if i.islower():
        i = i.upper()
    else:
        i = i.lower()
    print(i)
Output

Comments

Please sign up or log in to contribute to the discussion.