odd question
Jiri Barton
jbar at hosting4u.cz
Wed Jul 14 15:48:37 EDT 2004
Hello Karl,
I don't know the answer, but you can rewrite the expresion like this
return (i & k) | (j & k) | (i & j)
with the same meaning: all the combinations.
Supposing the variables are just plain booleans, f2 returns true if any two
of the three variables are true (or all three). It returns false if two
variables are false, or all the three are false.
My next suggestion is, maybe they are not integers. They might as well be
booleans.
jbar
More information about the Python-list
mailing list