has_path

has_path(G, source, target)[source]

Returns True if G has a path from source to target.

Parameters
GNetworkX graph
sourcenode

Starting node for path

targetnode

Ending node for path