answered 0 years ago
The following is an alternative solution (using networkx).
import networkx as nx G=graphs.PetersenGraph() NG = G.networkx_graph() sorted(nx.simple_cycles(NG))