Python: A, b = 1,2 and a = 1; b = 2 are strictly equivalent?
I am puzzled by the following:
a, b = 1071, 1029 while(a%b != 0): a, b = b, a%b
But the following snippet returns a ZeroDivisionError :
a, b = 1071, 1029 while(a%b != 0): a = b; b = a%b
while I expected both to be strictly equivalent.
Can anyone tell us about this please?
source to share