sort - Sorting functions

Sort functions.

topological_sort(pairs)[source]

Provide a topological ordering of the supplied pair elements.

pairs is a sequence of two element sequences, in which the first element comes before the second according to the desired ordering criterium.