Both have good and bad features:
The first is more obvious and readable, but the second is more flexible.
A better solution would be to use the logic of the first example, but return a value instead of printing it inside the function.
That way, you get readability and flexibility because the same function can be used from more places:
def largest(a,b,c):
if a>b and a>c:
return a
if b>a and b>c:
return b
return c
print(largest(1,4,7))