For this while loop below. It is clear how the v1,v2,v3 are updated to new data objects based on the equation. But I do not understand how u1,u2,u3 retains the original values of v1,v2,v3.Can someone help clarify? So u1 points to the original data referenced by v1 but not the new reference for v1.
def findModInverse(a,m):
if gcd(a,m) != 1:
return None
u1,u2,u3 = 1,0,a
v1,v2,v3 = 0,1,m
while v3 != 0:
q = u3 // v3
v1,v2,v3,u1,u2,u3 = (u1 - q * v1), (u2 - q * v2), (u3 - q * v3), v1, v2, v3
return u1 % m
mod = findModInverse(7,26)