Compose a Python program to insert an element at a given position in an array.
[1, 4, 5, 7], 2, 6
def insert_element(arr, position, element):
    arr.insert(position, element)

print(insert_element([1, 4, 5, 7], 2, 6)) # Output: [1, 4, 6, 5, 7]