I want to do multiple comparisons for a logical condition in python but I am not sure of the right way round for the and
and or
. I have 2 statements.
Statement 1:
#if PAB is more than BAC and either PAB is less than PAC or PAC is more than BAC
if PAB > BAC and PAB< PAC or PAB > BAC and PAC>BAC:
Statement 2:
#if PAB is more than BAC and PAC is less than PAB or if PAB is less than BAC and PAC is less than BAC
if PAB >BAC and PAC<PAB or PAB<BAC and PAC<BAC
Is or-ing the two ands the correct way to go about it?
Thanks.