is_path

is_path(G, path)[source]

Returns whether or not the specified path exists

Parameters
Ggraph

A NetworkX graph.

path: list

A list of node labels which defines the path to traverse

Returns
isPath: bool

A boolean representing whether or not the path exists