[Tutor] how to join two different files
Emile van Sebille
emile at fenx.com
Fri Jul 17 23:25:42 CEST 2009
On 7/17/2009 1:27 PM Kent Johnson said...
> On Fri, Jul 17, 2009 at 3:14 PM, Emile van Sebille<emile at fenx.com> wrote:
>
>> delim= '\t'
>>
>> file('ala', 'w').writelines(
>> [ delim.join([ii,jj] for ii,jj in
>> zip(
>> [xx.strip() for xx in
>> file('/home/amrita/alachems/chem2.txt','r').readlines()
>> ],
>> file('/home/amrita/pdbfile/pdb2.txt', 'r').readlines()
>> )
>> ]
>> )
>
> Maybe you could break that up a bit?
> This is the tutor list, not a
> one-liner competition!
>
Yeah, I knew that -- but as the OP submitted a one-liner to start with,
I simply responded in kind. That's why I put the flavor-to-taste
comment on...
Emile
More information about the Tutor
mailing list