Your syntax resembles me a bit of Perl.
I am not sure what exactly you want
def a_bigger_than_b(a,b):
'Yes' if a > b
to do; there are several possimble interpretations.
Amongst the ones already mentioned, you could as well want
def a_bigger_than_b(a, b):
if a > b: return 'Yes'
which does nothing in the <= case and eventually reaches the end of the function, where (implicitly) None is returned.
This is the one-liner syntax for Python, quite equvalent to the do_whatever if foo syntax in Perl.
Be aware that a function must always return a value; if you don't explicitly, None is returned implicitly.