Is there a way to add a list as a reference attribute to a list?
<p>Python newbie here and wanted to know if there was a way to combine two lists into a dictionary in a way where value can be a specific number.  Here's an example of the 3 datasets I'm trying to combine:</p>

<pre><code>[17, 39, 9]  [13, 37, 13]  =  0.13517353359
[17, 39, 9]  [15, 38, 10]  =  0.055003044449
[13, 39, 13]  [13, 37, 13]  =  0.0345037548204
[13, 39, 13]  [15, 38, 10]  =  0.0801704891415
[14, 39, 12]  [13, 37, 13]  =  0.0596711995129
[14, 39, 12]  [15, 38, 10]  =  0.055003044449
[15, 39, 11]  [13, 37, 13]  =  0.0848386442054
[15, 39, 11]  [15, 38, 10]  =  0.0298355997564
[16, 39, 10]  [13, 37, 13]  = 0.110006088898
[16, 39, 10]  [15, 38, 10]  =  0.0298355997564
</code></pre>

<p>I really want to be able to sort the numbers(I have a function that does this working already) and want to lookup by the first list(but need the second list as a reference).</p>

<p>I thought of doing something like <code>name = "%s-%s" % ([16, 39, 10], [15, 38, 10])</code> then adding name to a dict(with the number being the value) but the problem with this I couldn't search [16, 39, 10] to get the result.  I could make a dict like {[16, 39, 10]:[[15, 38, 10], 0.0298355997564]} but then my search function breaks.</p>

<p>I suspect I might have to do something wonky, but I was wondering if there was a better way to approach this?  Ideally I want a simple dict like <code>{[16, 39, 10]:0.0298355997564}</code> and [15, 38, 10] being some kind of attribute that I can reference when needed).</p>

<p>Is this possible? </p>

<p>edit: more details: I need it(reference, second list) there in case I need to reference it later(in this specific example, when I come across a duplicate for [16, 39, 10] I would use the second list to differinate between the results but in my full dataset there aren't many duplicates so its just to refer to in specific cases).</p>
