You can use graphlib.TopologicalSorter introduced in Python 3.9: ts = TopologicalSorter() for color in colors: ts.add(color) for rule in ...
確定! 回上一頁