diff --git a/pymathics/graph/components.py b/pymathics/graph/components.py index 760971b..72da1d7 100644 --- a/pymathics/graph/components.py +++ b/pymathics/graph/components.py @@ -60,7 +60,7 @@ def eval( if graph.G.is_directed() else nx.connected_components ) - components = [to_mathics_list(*c) for c in connect_fn(graph.G)] + components = [to_mathics_list(*sorted(c)) for c in connect_fn(graph.G)] return ListExpression(*components)