結果 : shortest path python code