NetworkX

Previous topic

networkx.center

Next topic

networkx.shortest_path_length

Quick search

networkx.shortest_path

shortest_path(G, source, target)

Return a list of nodes in a shortest path between source and target.

There may be more than one shortest path. This returns only one.