Another part of program takes care of that patternless stuff, only saving and retrieving for comparison is concerned for this part of the code.<br><br><span style="color: rgb(204, 0, 0);">
In [11]: d = { ('a', 'b'): '1',</span><br style="color: rgb(204, 0, 0);"><span style="color: rgb(204, 0, 0);">
....: ('c', 'd'): '2' }</span><br>
In [12]:<br>
In [12]: d['a', 'b']<br>
Out[12]: '1'<br><br>that does look like what I looking for, how does it work?<br><br><br><br><br><div class="gmail_quote">On Sat, Mar 22, 2008 at 3:12 PM, Kent Johnson <<a href="mailto:kent37@tds.net">kent37@tds.net</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">elis aeris wrote:<br>
> there is no pattern in the numbers.<br>
<br>
</div>Then how do you expect to create them automatically? I don't understand<br>
that part of the question.<br>
<div class="Ih2E3d"><br>
> two strings that look like "2.3.3.3.3.", youknow, str(int) + "." +<br>
> str(int) + "." and so forth<br>
> are presented and they equal to a value, which is the third string.<br>
><br>
> in short, given the first two strings, return the third string from the<br>
> list.<br>
<br>
</div>That sounds like you want a dict whose key is a tuple of the first two<br>
strings, and the value is the third string. For example,<br>
In [11]: d = { ('a', 'b'): '1',<br>
....: ('c', 'd'): '2' }<br>
In [12]:<br>
In [12]: d['a', 'b']<br>
Out[12]: '1'<br>
<font color="#888888"><br>
Kent<br>
</font></blockquote></div><br>