Eval of expr with 'or' and 'and' within

Michael Torrie torriem at gmail.com
Fri Jun 14 12:29:25 EDT 2013


On 06/14/2013 03:50 AM, Nick the Gr33k wrote:
>  >>> print(name or month or year)
> abcd
>  >>> print(name and month and year)
> ijkl

Interesting.  I'd have thought a boolean expression would return True or
False, not a string.  Learn something new every day.






More information about the Python-list mailing list