How do you make a function do reverse of what it was programmed to do in Python without reprogramming the entire function? For example:
swap1 = "abc"
swap2 = "def"
def swap():
    global swap1, swap2
    swap1 = swap2
into
swap1 = "abc"
swap2 = "def"
def swap():
    global swap1, swap2
    swap2 = swap1
Any help is appreciated.
 
     
     
     
    