コード例 #1
0
ファイル: hw_1b.py プロジェクト: LorenzoBi/algorithm_design
def create_Graph_from_file(file_name):
    graph = Graph()
    with open(file_name) as inputfile:
        next(inputfile)
        for line in inputfile:
            graph.add_node_to_Graph(line)
    return graph