Re: [Tutor] Depth First Search Listing all possible combinations

2013-11-24 Thread Randolph Scott-McLaughlin II
newpath = find_path(graph, node, end, path) if newpath: return newpath return None def find_all_paths(graph, start, end, path=[]): path = path + [start] if start == end: return [path] if not graph.has_key(start): return []

Re: [Tutor] Depth First Search Listing all possible combinations

2013-11-25 Thread Randolph Scott-McLaughlin II
I solved the question thanks to Alan's suggestions. Attached is the .py file I ran to solve my question. Thanks guys. On Sat, Nov 23, 2013 at 8:41 PM, Randolph Scott-McLaughlin II < randolph.michael...@gmail.com> wrote: > So I cleaned up the code to make it readable. I'm n