I\'m working on a group project and we need to create a list of all the values from a specific node attribute in the graph we are working on. Each node has 6 attributes, we jus
Your code won't run without more info. I think you want something like the function networkx.get_node_attributes():
In [1]: import networkx as nx
In [2]: G = nx.Graph()
In [3]: G.add_node(1,profit=17)
In [4]: G.add_node(2,profit=42)
In [5]: a = nx.get_node_attributes(G,'profit')
In [6]: a.items()
Out[6]: [(1, 17), (2, 42)]