On Thu, Oct 11, 2012 at 8:30 AM, eryksun <eryk...@gmail.com> wrote:
> On Thu, Oct 11, 2012 at 7:13 AM, Sunil Tech <sunil.tech...@gmail.com> wrote:
>>
>> text1 contains
>> This is from Text1 --- 1st line
>> ....
>>
>> text2 contains
>> This is from Text2 --- 1st line
>> ....
>>
>> i want result in text3 like
>> This is from Text1 --- 1st line
>> This is from Text2 --- 1st line
>> ....

zip gets you tuples.  map can operate on those tuples

I just tried this:
>>> x = [1,2,3]
>>> y = [4,5,6]
>>> def print_2(t):
...   print t[0], t[1]
...
>>> z = zip(x,y)
>>> z
[(1, 4), (2, 5), (3, 6)]

>>> r = map(print_2, z)
1 4
2 5
3 6
>>>

You need to write a function that writes the tuple to a file.  It will
look something like my print_2() function
-- 
Joel Goldstick
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to