Write a Python function that takes three numbers as arguments and returns the maximum value.
2, 5, 3
def max_val(a, b, c):
    if (a > b and a > c): 
        return a
    elif (b > a and b > c):
        return b
    else: 
        return c

result = max_val(2, 5, 3)
print(result)