Develop a Python algorithm to find the maximum element in a given array.
[1, 4, 6, 7, 3]
def find_max_element(arr):
    maxElement = arr[0]
    for val in arr:
        if val > maxElement:
            maxElement = val
    return maxElement