python两列数据生成邻接矩阵_用python实现邻接矩阵转换为邻接表,python语言实现...
graph={'A':['B','C'],'B':['C','D'],'C':['D'],'D':['C','G','H'],'E':['F'],'F':['C']}#从图中找出任意一条从起始顶点到终止顶点的路径deffind_path(graph,start,end,path=[]):ifstart==end:print"path",pathreturnTrueifnotgraph.get(st