Moore's Algorithm for Travelling Salesman Problem in Python