x=(not (5==5) and (10<12))
print(x)
when executing. not negates the first expression or both?
In my opinion "not" should be executed with (5==5) only but my colleague says it will affect the whole expression in the bracket like (5==5) and (10<12).
You can follow the approach I use. Instead of and we can place or operation to verify the answer. The result shows True . As the result is true so we can say that not (5==5) applies first. If the not operation runs with ((5==5) or (10<12)) then final result should be False. Hope it will help to understand.