On Wed, 14 Mar 2007, Isaac wrote: > a, b, c, or d is a type('str') not boolean which is what (c in "crab") is. > The [in] operator takes presedence, the first 3 times (c in "crab") returns > true and the last returns false; but the strings a, b, c, or d do not == > true or false - therefore the test (c == (c in "crab")) always returns > false.
The thing is, if the in operator takes precedence than why do (c == c in "crab") and (c == (c in "crab")) return different results? _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor