Create a Python script to compute the average of a list of elements
[1,4,7,3]
def average(l):
    total = 0
    for element in l:
        total += element
    return total / len(l)

l = [1,4,7,3]

print(average(l))