Sacred Heart <[EMAIL PROTECTED]> writes:
> array1 = ['one','two','three','four']
> array2 = ['a','b','c','d']
> 
> I want to loop through array1 and add elements from array2 at the end,
> so it looks like this:
> 
> one a
> two b
> three c
> four c

The "functional" style is to use the zip function that someone
described.  The old-fashioned way is simply:

   n = len(array1)
   for i in xrange(n):
       print array1[i], array2[i]

You can modify this in various ways if the lengths of the lists are
not equal.  E.g.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to