Skip to main content
`Ctrl`+`K`

# is_path

is_path(G, path)

  Returns whether or not the specified path exists.

  For it to return True, every node on the path must exist and each consecutive pair must be connected via one or more edges.

  Parameters:
    G graph

      A NetworkX graph.

    path list

      A list of nodes which defines the path to traverse

  Returns:
    bool

      True if `path` is a valid path in `G`