def dist(p1,p2):
return math.sqrt(((p1[0] - p2[0]) ** 2) + ((p1[1] - p2[1]) ** 2))
1. Get the coordinates of both points in space.
1. Subtract the x-coordinates of one point from the other, same for the y components.
1. Square both results separately.
1. Sum the values you got in the previous step.
1. Find the square root of the result above.
(x1-x2)squared+(y1+y2)squared=distances squared