python 两个变量的值进行交换的 n种实现 2022-10-10 14:48:54 方法一:c = 0c= aa= bb= c方法二:a,b = b,a (这是python的基本方法)方法三:(只用两个变量实现)a = a+bb = a-ba = a-b