graphit/graph_helpers.py
def edges_between_nodes(graph, nodes):
    """
    Return all edges in graph that connect the nodes

    :param graph:
    :param nodes:
    :return:
    """

    edge_selection = []
    for edge in graph.edges:
        if edge[0] in nodes and edge[1] in nodes:
            edge_selection.append(edge)

    return edge_selection

    Return all edges in graph that connect the nodes

    :param graph:
    :param nodes:
    :return:
    
Return all edges in graph that connect the nodes
Return all edges in graph that connect the nodes
def edges_between_nodes(graph, nodes):
    edge_selection = []
    for edge in graph.edges:
        if edge[0] in nodes and edge[1] in nodes:
            edge_selection.append(edge)
    return edge_selection
def edges_between_nodes ( graph , nodes ) : edge_selection = [ ] for edge in graph . edges : if edge [ 0 ] in nodes and edge [ 1 ] in nodes : edge_selection . append ( edge ) return edge_selection
Return all edges in graph that connect the nodes
Return all edges in graph that connect the nodes
"""
    Return all edges in graph that connect the nodes

    :param graph:
    :param nodes:
    :return:
    """
None
graph
None
nodes
None