Hello Miki, Many thanks for the support. I tried to insert and execute the code, but the following error happens:
Traceback (most recent call last): File "grafodna.py", line 10, in ? edges.sort(key = lambda u, v: (ddeg(u), ddeg(v))) TypeError: <lambda>() takes exactly 2 arguments (1 given) Do you know how is it possible to delete it? Thanks. Nic "Miki" <[EMAIL PROTECTED]> ha scritto nel messaggio news:[EMAIL PROTECTED] > Hello Nic, > > Python lists has a very powerfull buid-in "sort". > > edges = list(G.edges()) > edges.sort(key = lambda u, v: (ddeg(u), ddeg(v))) > for u, v in edges: > print u,v, # Note the training comma to avoid newline > print > > HTH, > Miki > http://pythonwise.blogspot.com > -- http://mail.python.org/mailman/listinfo/python-list