Thanks, This one really works.
JD On Oct 17, 3:17 pm, [EMAIL PROTECTED] wrote: > JD, you probably need the algorithm for connected components of an > undirected graph. > > For example you can do that with my graph > lib:http://sourceforge.net/projects/pynetwork/ > > from graph import Graph > g = Graph() > data = [['a', 'b'], ['c', 'd'], ['e', 'f'], ['a', 'g'], ['e', 'k'], > ['c', 'u'], ['b', 'p']] > g.addArcs(data, bi=True) > > print g.connectedComponents() > # Output: [['a', 'b', 'g', 'p'], ['c', 'u', 'd'], ['e', 'k', 'f']] > > Bye, > bearophile -- http://mail.python.org/mailman/listinfo/python-list