True == 1 weirdness

Blake T. Garretson blake.garretson at gmail.com
Wed Sep 16 15:17:25 CEST 2015


On Wednesday, September 16, 2015 at 9:08:54 AM UTC-4, jmp wrote:
> x = 5
> 3 < x < 10

That's a great example.  I use this case all the time and didn't think to apply the same principal to the in/== case.  I assumed that "in" was evaluated first, and then the == comparison was made.  Thanks!


More information about the Python-list mailing list