I'm struggling to understand how to create variable lists in python (I'm an R programmer).
I want to create a variable list name to store an array of minimum paths in a network with say 6 loads (sinks) and 3 generators (sources) using 'networkx', something like this:
nx
is the network and G
is a Digraph
for i in sinks:
print("Analysis for node ",i," :")
for j in sources:
for path in nx.all_simple_paths(G,j,i):
print (path)
"node_"+str(i)[i] = path #How to do this??
in such a way that "node_1" has all paths from node 1 to all sources, "node_2" all paths from node 2 to all sources, etc.