Re: two files into an alternate list

2007-10-31 Thread Ricardo Aráoz
Tim Chase wrote: >> i have a file : >> file 1: >> 1 >> 2 >> 3 >> 4 >> 5 >> 6 >> >> file2: >> a >> b >> c >> d >> e >> f >> how do i make the two files into list like this = >> [1,a,2,b,3,c,4,d,5,e,6,f] > > from itertools import cycle > def serialize(*sources): > while True: >

Re: two files into an alternate list

2007-10-29 Thread Tim Chase
> i have a file : > file 1: > 1 > 2 > 3 > 4 > 5 > 6 > > file2: > a > b > c > d > e > f > how do i make the two files into list like this = > [1,a,2,b,3,c,4,d,5,e,6,f] from itertools import cycle def serialize(*sources): while True: for source in sources: yield

Re: two files into an alternate list

2007-10-29 Thread J. Clifford Dyer
n And what if file 1 has more lines than file 2? Cheers, Cliff 1 On Mon, Oct 29, 2007 at 09:50:51PM +0530, Beema shafreen wrote regarding two files into an alternate list: > Delivered-To: [EMAIL PROTECTED] > Date: Mon, 29 Oct 2007 21:50:51 +0530 > From: "Beema shafreen" &l

two files into an alternate list

2007-10-29 Thread Beema shafreen
hi everybody , i have a file : file 1: 1 2 3 4 5 6 file2: a b c d e f how do i make the two files into list like this = [1,a,2,b,3,c,4,d,5,e,6,f] regards shafreen -- http://mail.python.org/mailman/listinfo/python-list