hpr*_*ram -2 python reverse function
如何在没有重新编程整个函数的情况下使函数与Python中编程的函数相反?例如:
swap1 = "abc"
swap2 = "def"
def swap():
global swap1, swap2
swap1 = swap2
Run Code Online (Sandbox Code Playgroud)
成
swap1 = "abc"
swap2 = "def"
def swap():
global swap1, swap2
swap2 = swap1
Run Code Online (Sandbox Code Playgroud)
任何帮助表示赞赏.