a,b = 0,1
while b < 50:
print(b)
a = b
b = a+b
outputs:
1
2
4
8
16
32
wheras:
a,b = 0,1
while b < 50:
print(b)
a,b = b, a+b
outputs (correct fibonacci sequence):
1
1
2
3
5
8
13
21
34
Aren't they the same? I mean a,b = b, a+b is essentially the same as a = b and b = a+b written separately -- no?