I'm trying to start Travelling Salesman Problem on both python 2.7 and 3.5 have an error --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-4-c22100a4a245> in <module>() 156 plt.figure(1) 157 pos = DrawGraph(G,'black') --> 158 opGraph = christofedes(G, pos) 159 plt.figure(2) 160 pos1 = DrawGraph(opGraph,'r') <ipython-input-4-c22100a4a245> in christofedes(G, pos) 95 # finds the hamiltonian circuit 96 curr = start ---> 97 visited[curr] = True 98 for nd in MST.neighbors(curr): 99 if visited[nd] == False or nd == start: TypeError: list indices must be integers, not dict