0

Could I generate a graph from the following data, where the node "root" is the the node with label "V_ini" and it has edges with the different items of a given list "List":

    V_ini=(0,0,0)
    List=[(a,b,c),(1,0,1),(1,2,2)]

The expected result is a graph like that:

(0,0,0)->(a,b,c)
(0,0,0)->(1,0,1)
(0,0,0)->(1,2,2)
Sec_Girl
  • 3
  • 3
  • 1
    Have you looked at this question: https://stackoverflow.com/questions/19472530/representing-graphs-data-structure-in-python – Jens May 06 '19 at 12:14
  • 1
    You should take a look at the networkx library – Alexis Pister May 06 '19 at 12:20
  • I study the networkx library, but I didn't find the way to transform the items of a list of list (about 150 items) to nodes and link them to a root node. Could you help me ?? – Sec_Girl May 06 '19 at 22:47

0 Answers0