Python's .swapcase() method converts uppercase letters to lowercase and lowercase to uppercase in a string, returning a new string while leaving non-alphabetic characters unchanged. For example, 'Hello World' becomes 'hELLO wORLD'.

1m watch time

Sort: