Python program to toggle Case of string

 x=input("Enter String ")

f=len(x)

for i in range(0,f):

    z=ord(x[i])

    if z>=65 and z<91:

        print(chr(z+32),end=" ")

    elif z>=97 and z<122:

        print(chr(z-32),end=" ")

Comments

Popular posts from this blog

Binary Search, Linear Search, Selection Sort and Bubble sort Python Menu Program

Housie/Tambola using Python with Tickets in PDF file

100% Working C++ Tambola/Housie Code with 90 Unique Numbers