ok, yea its probably best to do it one another line. I just thought there was a
command that computed the center of a list of coords easier than constucting it
manually.
thanks for the help,
Sam
--
You received this message because you are subscribed to the Google Groups
"Python Programming
hi,
if you want to do it absolutely in one line, maybe something like
getCentroid = lambda inputs : [sum([a[x] for a in inputs]) /
float(len(inputs)) for x in range(3)] if len(inputs) else None
? Then you can use
getCentroid([[1, 0, 0], [0, 1, 0], [-1, 0, 0]])
for example.
But why doing it i