<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2668" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>Luis and all,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I want to more than matching, I am trying to find all the available combos, 
e.g a1&nbsp;== x1 or a1 == x2 or a1 !=&nbsp;x1.</DIV>
<DIV>&nbsp;</DIV>
<DIV>HTH,</DIV>
<DIV>Nathan Pinno&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>I also noticed you forgot the a[1] == b[1]. (grin) :)</DIV>
<DIV>&nbsp;</DIV>
<DIV>----- Original Message ----- </DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=tegmine@gmail.com href="mailto:tegmine@gmail.com">Luis N</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=tutor@python.org 
  href="mailto:tutor@python.org">tutor@python.org</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, July 27, 2005 3:01 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Tutor] How do I go about 
  this?</DIV>
  <DIV><BR></DIV>On 7/27/05, <B class=gmail_sendername>Nathan Pinno</B> &lt;<A 
  href="mailto:falcon3166@hotmail.com">falcon3166@hotmail.com</A>&gt; wrote:
  <DIV><SPAN class=gmail_quote></SPAN>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
    <DIV>Hi all,</DIV>
    <DIV>&nbsp;</DIV>
    <DIV>How do I go about the following: I want to write a program that will 
    print two lists one after another, then show all the available possibilities 
    for matches e.g a0 and x0.</DIV>
    <DIV>&nbsp;</DIV>
    <DIV>Here is what I have so far:</DIV>
    <DIV>&nbsp;</DIV>
    <DIV>lista = [x0, x1, x2, x3]<BR>listb = [a0, a1, a2, a3]<BR>print 
    lista<BR>print listb<BR></DIV>
    <DIV>Thanks for the help,</DIV><SPAN class=sg>
    <DIV>Nathan Pinno</DIV></SPAN></BLOCKQUOTE>
  <DIV><BR><BR>Hi,<BR><BR>Could you give some additional information as to what 
  you intend to do? If you are strictly matching, by position within the lists, 
  such that you would print the list elements only if: <BR><BR>for x in 
  range(min(len(lista),len(listb))):<BR>&nbsp;&nbsp;&nbsp; a = 
  lista[x]<BR>&nbsp;&nbsp;&nbsp; b = listb[x]<BR>&nbsp;&nbsp;&nbsp; if a == 
  b:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print a, b<BR><BR>that is 
  easy, however, if you want to match more complex patterns, or wish to match 
  list elements not in the same position then the complexity of the task 
  increases.</DIV></DIV>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>Tutor maillist&nbsp; 
  -&nbsp; 
Tutor@python.org<BR>http://mail.python.org/mailman/listinfo/tutor<BR></BLOCKQUOTE></BODY></HTML>