implementation of traveling salesman problem in python