In a python console (using 2.7) if I put in the following code:
vals = [1.2e-5, 1.5e-5, 3.2e-5, 4.5e-5]
for val in vals: print val < 0.001,
The output is True True True True
as expected.
But! Here is my problem, if I try all(vals) < 0.001
it returns false?
Is it the number formatting giving it problems or something else? If I do this again but replace the vals list with vals = [2,2,2,2]
and check for < 3
I get the desired output both ways!
EDIT Helpful answers, it is interesting to note that all([0.1, 0.1, 0.1]) evaluates to True, but 0.1 == True evaluates to False? What's up with this? Is it that a "nonzero" value will evaluate to True but is not actually "True"?