On 3/21/2014 3:40 PM, Steven D'Aprano wrote:
a = b
This assigns the value to b. So if b was 4, now a is also 4.
Steven means 'assigns the value to a' here. For anyone looking down the
line...
___
Tutor maillist - Tutor@python.org
To
On 03/21/2014 06:14 PM, Gary wrote:
Pythonists
I am trying to understand the difference between
a = b
b = a + b
and
a,b = b, a+ b
When used in my Fibonacci code the former generates 0,1,2,4,8,16,32 and the
later
Generates 0,1,1,2,3,5,8,13,21,34,55,89. The second is the sequence I want,
Pythonists
I am trying to understand the difference between
a = b
b = a + b
and
a,b = b, a+ b
When used in my Fibonacci code the former generates 0,1,2,4,8,16,32 and the
later
Generates 0,1,1,2,3,5,8,13,21,34,55,89. The second is the sequence I want, but
I would
Like to understand the
On Mar 21, 2014 1:16 PM, Gary gwengst...@yahoo.com wrote:
Pythonists
I am trying to understand the difference between
a = b
You have overwitten a
b = a + b
and
a,b = b, a+ b
This one evaluates the right side first, then assigns the result to a and b
When used in my Fibonacci code the
On 21/03/14 17:14, Gary wrote:
Pythonists
I am trying to understand the difference between
a = b
b = a + b
This does exactly what it says.
It first makes a and b identical then makes b equal
their sum, that is, b+b
and
a,b = b, a+ b
The second form is not always available in
Gary gwengst...@yahoo.com writes:
Pythonists
I am trying to understand the difference between
a = b
Retrieves the value referenced by ‘b’, then binds the name ‘a’ to the
value.
b = a + b
Evaluates the expression ‘a + b’, then binds the name ‘b’ to the result.
and
a,b = b, a+ b
On Fri, Mar 21, 2014 at 01:14:22PM -0400, Gary wrote:
Pythonists
I am trying to understand the difference between
a = b
b = a + b
and
a,b = b, a+ b
Try to evaluate the code in your head, as if you were the Python
interpreter. Starting with the first version:
a = b
This