Find the maximum element in an array using a Python program.
[1, 4, 9, 3, 6]
def findMax(arr):
    max = arr[0] 
    for i in range(1,len(arr)): 
        if arr[i] > max: 
            max = arr[i] 
  
    return max