networkx.classes.function.neighbors

neighbors(G, n)[source]

Return a list of nodes connected to node n.