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 + (
Calculate the Euclidean distance for multidimensional space:
import math x = [1, 2, 6] y = [-2, 3, 2] dist = math.sqrt(sum([(xi-yi)**2 for xi,yi in zip(x, y)])) 5.0990195135927845