Routing Algorithm Shortest Path Algorithm In Python