not, or and and in one condition, and has no brackets to show the order.
def pick(x, y):
if not x or y and x > y:
return "first"
elif x == y or not y:
return "second"
return "third"
print(pick(0, 5), pick(4, 2), pick(3, 3), pick(2, 9))
What does the program print?Log in to join the discussion.
Loading…