var = "Good morning" new_str = var.swapcase() print(new_str) #output #gOOD MORNING