On Tue, Jul 1, 2008 at 7:03 AM, Norman Khine <[EMAIL PROTECTED]> wrote:
> Kent Johnson wrote:
>> for first in x:
>>  for second in y:
>>    if first and second and (first, second) in table:
>
> I don't really see this clearly as I may have n'th values for 'x' and n'th
> values for 'y' so I will need to loop over all these, but without knowing
> the n'th value where to stop my loop?
>
> Or have I missed the point ;)

I think so, as that is exactly what the for loop will do. For example:
In [1]: x = [1,2, 5]

In [2]: for item in x:
   ...:     print item
   ...:
1
2
5

Kent
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to