Schizoid Man wrote: > As in variable assignment, not homework assignment! :) > > I understand the first line but not the second of the following code: > > a, b = 0, 1 > a, b = b, a + b > > In the first line a is assigned 0 and b is assigned 1 simultaneously. > > However what is the sequence of operation in the second statement? I;m > confused due to the inter-dependence of the variables. In the second line a now points to the value 1 and b points to 1 (the sum of zero and one) in a unitary operation (i.e. in turn, but effectively simultaneously).
You might disassemble the code to see the sequence. Colin W. -- http://mail.python.org/mailman/listinfo/python-list