string.swapcase()

string.swapcase(s) → string[source]

Return a copy of the string s with upper case characters converted to lowercase and vice versa.