[Tutor] Use of 'or'

Stephen Nelson-Smith sanelson at gmail.com
Tue Nov 17 14:39:07 CET 2009


A friend of mine mentioned what he called the 'pythonic' idiom of:

print a or b

Isn't this a 'clever' kind or ternary - an if / else kind of thing?

I don't warm to it... should I?

S.


More information about the Tutor mailing list