Solve the TSP problem in Python