On Dec 13, 3:33 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Wed, 12 Dec 2007 19:18:20 -0800, rishiyoor wrote: > > I'm trying to write a program that will find the distance between two > > groups of points in space, which have cartesian co-ordinates X,Y and Z. > > points1 = [ (1.2, 3.4), (5.7, 9.2) ] > points2 = [ (-6.3, 0.0), (14.1, -7.8), (2.6, 12.8) ] > > import math > def distance(p1, p2): > return math.hypot(p1[0]-p2[0], p1[1]-p2[1])
X, Y, .... umm, aren't we short a dimension? -- http://mail.python.org/mailman/listinfo/python-list