Develop a function in Python that takes a list of numbers as an argument and returns the difference between the maximum and minimum value.
[3, 4, 7, 8, 12]
def maxMinDifference(arr):
    return max(arr)-min(arr)

result = maxMinDifference([3, 4, 7, 8, 12])
print(result)