a = 10 b = 8 a,b = b,a print(a,b) --8 10
在多重赋值中,Lua先对等号右边的所有元素求值,然后才执行赋值。
所以在a赋值为b之前,右边的a已经确定好了是10了
也就是先确定右边的b,a为8,10,然后赋值a=8,b=10。