On 7/27/05, Luis N <[EMAIL PROTECTED]> wrote:
On 7/27/05, Nathan Pinno <[EMAIL PROTECTED] > wrote:Hi all,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.Here is what I have so far:lista = [x0, x1, x2, x3]
listb = [a0, a1, a2, a3]
print lista
print listbThanks for the help,Nathan Pinno
Hi,
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:
for x in range(min(len(lista),len(listb))):
a = lista[x]
b = listb[x]
if a[1] == b[1]:
print a, b
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.
Woops, I forgot the a[1], b[1]
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor