Python program to convert the reverse case of an input character
In this article, you will learn how to convert the reverse case of an input character in the python programming language.
'd' after conversion 'D'
'D' after conversion 'd'
You should have knowledge of the following topics in python programming to understand this program:
# Python program to convert the reverse case of an input character print ("Enter an alphabet character to convert: ", end="") random_char = str (input ()) print ("The Reverse case of the '", random_char, "' is: ' ", end="") if random_char.islower(): random_char = random_char.upper() else: random_char = random_char.lower() print (random_char,"'")
Enter an alphabet character to convert: D
The Reverse case of the ' D ' is: ' d '
In this given program, we have taken input
D from the user and applied the function to convert the input's reverse case.