[Edu-sig] Truth values and comparisons

Arthur ajsiegel at optonline.net
Mon Oct 30 20:15:31 CET 2006


Dan Crosta wrote:

>
>be careful:
>
> >>> a = [1, 0, -1]
> >>> if a: print "true"
>true
> >>> if sum(a) != 0: print "true
>  
>
Oops. 

Definitely keep me away from space shuttle projects ;)

Art




More information about the Edu-sig mailing list