While working with Fibonacci sequence:
a = 1
b = 3
a, b = b, a + b
print a, b
This properly results to a = 3
and b = 4
Now if I would re-code it as:
a = 1
b = 3
a = b
b = a + b
print a, b
the resulting variable b
is 6
instead of 4
.
What happens "behind of scenes" when one-liner a, b = b, a + b
is used?