x = [0, 5, 10, 15, 20]
xdiff = [(x[n] - x[n - 1]) for n in range(1, len(x))]
xdiff
all([(xdiff[0] == xdiff[n]) for n in range(1, len(xdiff))])
Calculate difference between adjacent items in a python list