Task: Write a Python Program to convert string to Opposite case. This Python programming tutorial will input a string and convert its letters to opposite case. It means that if this Python code will find a lower case letter, it will convert it into upper case and vice versa.
For example, it will convert the input string Hello into hELLO. It converts ‘H’ into ‘h’, ‘e’ into E and so on.
The Source code of Python Program to convert string to Opposite case
The output of the Python program
Enter a string to convert into opposite case letter wise:Hello python
Hello python in oPPOSITE case = hELLO PYTHON
1,827 total views, 1 views today