Python algorithms for the traveling salesman problem