Hi all: I am trying to formulate a "path-finding" function, and I am stuck on this problem:
Please look at the picture attached: Those dots are coordinates of (x,y), and this tree can be thought of as a list of tuples, with each tuple consisting of (x,y). Now I am trying to make a function go through this list of tuples and then return the "path." to go from, say, 4 to 8. If I simply compute for the dot for shortest distance, then the solution would be to go from 4 to 8 direct, but that doesn't work, because the correct solution should have been 4,3,2,5,6,8. How do I do this? Thanks! _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor