I see. Thanks for clarifying that for me. -Isaac
On 3/15/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
Isaac wrote: > In 5.9 of the Language Reference it says: > > "Comparisons can be chained arbitrarily, e.g., |x < y <= z| is > equivalent to |x < y and y <= z" > > |So this would mean that > > item == item in word2 > > means: > > item == item and item in word2 > > not > > (item == item) and (item in word2) > > which would first return each value in parentheses and place each value > on either side of the boolean operator [ and ] What do you think your expression does? Since 'and' has a lower precedence than == and 'in', the two expressions have the same meaning. I added the parentheses for emphasis. Kent
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor