It a dictionary. You can look at the results in order with
|
ans =solve(...)
fork inordered(ans):
print(k,ans[k])
|
You could also turn that dict into an ordered list with `ans =
list(ordered(ans.items()))`.
On Sunday, October 13, 2019 at 7:54:23 PM UTC-5, Rick Richardson wrote:
For example:
>>> a,b,e,c,f,d,g,h,i,j,k,l,m,n,o,p = symbols("a b e c f d g h i j
k l m n o p ", integer=True)
>>> print
solve([a-(1),a+b-(17),a+e-(20),b+c-(19),b+f-(22),c+d-(21),c+g-(24),d+h-(26),e+f-(25),e+i-(12),f+g-(27),f+j-(14),g+h-(29),g+k-(16),h+l-(18),i+j-(1),i+m-(4),j+k-(3),j+n-(6),k+l-(5),k+o-(8),l+p-(10),m+n-(9),n+o-(11),o+p-(13)],[a,b,e,c,f,d,g,h,i,j,k,l,m,n,o,p])
{f: 6, h: 8, k: -5, l: 10, o: 13, c: 3, i: -7, d: 18, g: 21, j: 8,
m: 11, n: -2, a: 1, b: 16, e: 19, p: 0}
They come out in random order!
--