I have two points in 3D:
(xa, ya, za) (xb, yb, zb)
And I want to calculate the distance:
dist = sqrt((xa-xb)^2 + (ya-yb)^2 + (
Here's some concise code for Euclidean distance in Python given two points represented as lists in Python.
def distance(v1,v2): return sum([(x-y)**2 for (x,y) in zip(v1,v2)])**(0.5)