So, I do not understand why Python does not evaluate correctly this code:
def makes10(a, b):
  if (a or b == 10) or (a + b == 10):
    return True
  else:
    return False
while the following is interpreted as expected:
def makes10(a, b):
  if a == 10 or b == 10 or (a + b == 10):
    return True
  else:
    return False
They look the same to me, but obviously (a or b == 10) was not interpreted as (a == 10) or (b == 10). Can someone please explain why this happens?
 
    