You are doing two prints, the first one in the corpus of your function and the second one is printing the result of the function, which as actually None.
You should rather do something like this:
def yourfunction(x, y):
if x > y:
return y
else:
return x