Hello, I want to compute this: G= graphs.CompleteGraph(4) G.delete_edge({1,2}) L = [u for u in G.vertices()] for x in L: for y in L: A = Set(G.neighbors(x)) B = Set(G.neighbors(y)) C= A.union(B) if (C in Subsets(G.neighbors(1))): print(x,y) the result is :
(1, 1) (1, 2) (2, 1) (2, 2) but I don't want the function prints (1,1) & (2,2) so what should I write in the function to omit these pairs? -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out.