Just starting to learn Python, and encounter a problem

Steven D'Aprano steve at pearwood.info
Sat Jul 23 21:58:52 EDT 2016


On Sun, 24 Jul 2016 04:18 am, gst wrote:

> Heuh case 2 :
> 
> "String1" or "String2"
> 
> Evaluates to "String1" ?


Correct. What did you expect?

Have you read the Fine Manual?


https://docs.python.org/3/reference/expressions.html#boolean-operations



-- 
Steven
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.




More information about the Python-list mailing list