On Tuesday, February 26, 2013 1:40:26 PM UTC+5:30, Santanu wrote: > > Dear all, > I have a set non linear equations over Boolean variables x_1,..., > x_{10000}. > Sat solver gives I=[{x1: 0, x100: 1, .....}]. I am interested to see only > the values > of x1,.., x100. Will you kindly help me ? >
Hello, Let d be the concerned dictionary, whose keys are x1 to x10000, and corresponding to each key, value is in {0,1}. One can do the following: l = [ ] for i in range(1,101): l.append('x' + str(i)) d1 = { } d1 = {keys:d[keys] for keys in l} The result will be the dictionary d1 containing only (key,value) pairs corresponding to keys x1,....x100. Regards, AKHIL. > > > > > -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.