Get node list from random walk in networkX
问题 I am new to networkX. I created a graph as follows: G = nx.read_edgelist(filename, nodetype=int, delimiter=',', data=(('weight', float),)) where the edges are positive, but do not sum up to one. Is there a built-in method that makes a random walk of k steps from a certain node and return the node list? If not, what is the easiest way of doing it (nodes can repeat)? Pseudo-code: node = random res = [node] for i in range(0, k) read edge weights from this node an edge from this node has