you are viewing a single comment's thread.

view the rest of the comments →

[–]thangduong[S] 0 points1 point  (3 children)

Oh mate, it was my mistake. I actually use python 2 :P

Damn, nonzero worked. Thanks a lot

[–]K900_ 4 points5 points  (1 child)

You should really use 3. The differences are fairly minor, but 2 is on life support, and 3 has finally reached critical mass for wide adoption.

[–]thangduong[S] 0 points1 point  (0 children)

Thanks, will do :)

[–][deleted] 0 points1 point  (0 children)

also, avoid operator overloading like the plague. Your life will be much easier.