Python String swapcase() Method
Python swapcase() method converts case of the string characters from uppercase to lowercase and vice versa. It does not require any parameter and returns a string after case conversion.
It returns a string.
Let's see some examples of swapcase() method to understand it's functionality.
Python String swapcase() Method Example 1
It is a simple example to convert uppercase to lowercase using the swapcase() method.
Python String swapcase() Method Example 2
This example describes conversion from lowercase to uppercase.
Python String swapcase() Method Example 3
If the string is in camelcase, the output of this method also would be in camelcase. All the lowercase will be converted to uppercase and vice versa.
JavaTpoint offers too many high quality services. Mail us on [email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected]
Duration: 1 week to 2 week