As @Julien stated in comment upper and lower methods return a copy, and do not change the object itself. See this docs.
EDIT @aryamccarthy reminded me of already existing feature for this kind of task in python: swapcase() method. See more here. Note this also returns a copy of the string.