Find the maximum value of a 10 element array in Python.
array = [1, 7, 3, 4, 5, 9, 8, 0, 2, 6]
# Max value in array

def max_val(array):
    max_val = array[0]
    for num in array[1:]:
        if num > max_val:
            max_val = num
    return max_val