[Tutor] python: how do I create a list of definitions?

Luke Paireepinart rabidpoobear at gmail.com
Fri Jul 20 04:26:04 CEST 2007


>
>> You can observe this in the following situation:
>>  >>> y = x = 2243
>>  >>> y
>> 2243
>>     
>
> I think this is a special case of assignment. Try
> y = (x = 2243)
> and you will see that (x = 2243) is not an expression.
>   
Oh.  Thanks for pointing that out.  I wondered why I couldn't "print x = 
2243" but I could chain together assignments.
> Kent



More information about the Tutor mailing list