We're back after a server migration that caused effbot.org to fall over a bit harder than expected. Expect some glitches.

str.swapcase

swapcase()

Return a copy of the string with uppercase characters converted to lowercase and vice versa.

For 8-bit strings, this method is locale-dependent.