Ask Your Question

Revision history [back]

You can replace graphs(10) by

filter(lambda g: g.is_connected(), graphs(10))

It is more efficient to use the nauty backend; replace graphs(10) by

graphs.nauty_geng('10 -c')