結果 : best way to implement a graph in python