comparison between the items of one list with the items of another list both of which reside in an outer list
<p><a href="http://stackoverflow.com/questions/6932507/working-with-a-big-list/6933284#6933284">working with a big list</a> This is my earlier post about this program which generates the following list. The program I am writing deals with a big linked list. This list is called phonemeList. The list is like the following:</p>

<pre><code>[[('dh', [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [0.15, 0.35], [-1, -1]]), 

  ('ih', [[-1, -1], [-1, -1], [0.3, 1.0], [-1, -1], [0.05, 0.15], [-1,-1]]),  

  ("'", None),  

  ('k', [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [0.15, 0.8], [-1, -1]]), 

  ('aa', [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [0.15, 1.0], [-1, -1]]), 

  ('r', [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [0.15, 0.6], [-1, -1]]), 

  ("'", None),  

  ('p', [[-1, -1], [0.2, 1.0], [-1, -1], [-1, -1], [0.15, 0.2], [-1, -1]]), 

  ('ih', [[-1, -1], [-1, -1], [0.3, 1.0], [-1, -1], [0.05, 0.15], [-1, -1]]), 

  ("'", None), 

  ('k', [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [0.15, 0.8], [-1, -1]]), 

  ('iy', [[-1, -1], [-1, -1], [0.3, 1.0], [-1, -1], [0.1, 0.15], [-1, -1]]),

  ('ng', [[-1, -1], [-1, -1], [0.3, 1.0], [-1, -1], [0.09, 0.3], [-1, -1]]),

  ("'", None), 

  ('er', [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [0.15, 0.5], [-1, -1]]), 

  ("'", None), 

  ('sh', [[-1, -1], [-1, -1], [-1, -1], [0.3, 1.0], [-1, -1], [-1, -1]]), 

  ('eh', [[-1, -1], [-1, -1], [0.1, 0.5], [-1, -1], [0.4, 0.7], [-1, -1]]), 

  ('m', [[-1, -1], [0.2, 1.0], [-1, -1], [-1, -1], [0.15, 0.2], [-1, -1]]), 

  ("'", None), 

  ('p', [[-1, -1], [0.2, 1.0], [-1, -1], [-1, -1], [0.15, 0.2], [-1, -1]]),

  ('uw', [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [0.5, 1.0]]), 

  ('dx', [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [0.15, 0.35], [-1, -1]]), 

  ("'", None), 

  ('aa', [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [0.15, 1.0], [-1, -1]]), 

  ("'", None), 

  ('er', [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [0.15, 0.5], [-1, -1]]), 

  ("'", None), ('aa', [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [0.15, 1.0], [-1,-1]]), 

  ("'", None), 

  ('r', [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [0.15, 0.6], [-1, -1]]), 

  ('iy', [[-1, -1], [-1, -1], [0.3, 1.0], [-1, -1], [0.1, 0.15], [-1, -1]]),

  ("'", None), 

  ('ih', [[-1, -1], [-1, -1], [0.3, 1.0], [-1, -1], [0.05, 0.15], [-1, -1]]),

  ('n', [[-1, -1], [-1, -1], [-1, -1], [0.3, 1.0], [-1, -1], [-1, -1]]), 

  ('t', [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [0.15, 0.4], [-1, -1]]), 

  ('l', [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [0.15, 0.6], [-1, -1]]), 

  ("'", None), ('r', [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [0.15,0.6], [-1, -1]]), 

  ('ah', [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [0.15, 1.0], [-1, -1]]), 

  ('k', [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [0.15, 0.8], [-1, -1]])]]
</code></pre>

<p>Could you kindly have a look at the link so that you have an idea about the program. Thank you. [0.15,0.6] is not a list but a range. Here it is expressed as a list which may be wrong. This means the value can vary from 0.15 to 0.6. Where as [-1,-1] is a no range thing which is not in use and can be replaced by a range of positive numbers while comparing. Now I need to compare the items of 'dh' with the items of 'ih' . The first item of 'dh' will be compared to first item of 'ih' then 2nd item to 2nd and so on. Then the items of 'dh' will be compared to items of 'k' ignoring "'". 'dh' will be compared to all following the rules. Then 'ih' comes into picture and the same thing is repeated. While doing this ("'", None), should be ignored. The ranges get changed during comparison and [-1,-1] will be replaced. The ("'", None) is like a boundary. After comparison of all items with one another, the next step would be to compare within these boundaries. Being a beginner this is really a complex thing for me. But this is also my main project so please help me with this. Thank you very much.   </p>
