class Node: def init_(self, name, par = None, w=0): self.name = name self.par = par self.w = w def display(self): print(self.name, self.w) def lt_(self, other): if other == None: return False return self.w< other.w def _eq_(self, other): if other == None: return False return self.name == other.name def equal(0, G): if 0.name == G.name: return True return False for x in Open: def checkInArray(tmp, Open): if equal(x, tmp): return True return False def getPath(0): print(0.name) if O.par != None: getPath(0.par) else: return