Python Euclidean Distance
You can collapse the summation using sum():

sum_dims = sum((data_x[dim] - data_y[dim]) ** 2
               for dim in range(dimensions))


Or, what if you would "zip" the x and y:

sum_dims = sum((x - y) ** 2 for x, y in zip(data_x, data_y))