Python Forum
Boolean: Anybody know why is this True?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Boolean: Anybody know why is this True?
#6
(Feb-05-2022, 12:37 PM)LilD Wrote: Based on the hierarchy, shouldn't we look at "and" first instead of "or"?
Or am I misunderstanding something?
It will look at the AND first but all that is saying is if both parts of the AND are true then it's true. In this case this fails so it would say false.
Then it also has to look at the OR and finds it to be true so the answer will be true.
Perhaps it would be simpler to understand if it were bracketed.
(if A is true AND B is true) OR if C is true.
So it's saying, in effect, if the first part is true OR if the second part is true the answer will be True.
LilD and menator01 like this post
Reply


Messages In This Thread
Boolean: Anybody know why is this True? - by LilD - Feb-05-2022, 09:40 AM
RE: Boolean: Anybody know why is this True? - by Barrowman - Feb-05-2022, 02:51 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need to parse a list of boolean columns inside a list and return true values Python84 4 2,224 Jan-09-2022, 02:39 AM
Last Post: Python84
  Returning True or False vs. True or None trevorkavanaugh 6 9,494 Apr-04-2019, 08:42 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020