How to use 'swapcase in python' in Python

Every line of 'swapcase in python' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
58def test_swap_case():
59 assert Chepy("SoMe TeXt").swap_case().o == "sOmE tExT"

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

475def swapcase(self, s):
476 """
477 Return a copy of *s*, but with lower case letters converted to upper case and
478 vice versa.
481 """
482 pass

Related snippets