Sincerely,
Daan
-Original Message-
From: David Hutto [mailto:smokefl...@gmail.com]
Sent: zaterdag 15 januari 2011 22:50
To: Daan Raemdonck
Cc: tutor@python.org
Subject: Re: [Tutor] Add rownumber to list of .arff files
>>> filename = ['file1','file2','
>>> filename = ['file1','file2','file3']
>>> fileprefix = 'TRE_'
>>> for item in filename: print('%s%s'%(fileprefix,item))
...
TRE_file1
TRE_file2
TRE_file3
or with list comp
>>> combined = [('%s%s'%(fileprefix,item)) for item in filename]
>>> combined
['TRE_file1', 'TRE_file2', 'TRE_file3']
>>>
On Sat, Jan 15, 2011 at 12:02 PM, Daan Raemdonck
wrote:
> Dear all,
>
>
>
> I am reaching out to you because I have a small issue I need to deal with,
> yet I feel that it requires pretty advanced coding to solve.
>
> I have a whole lot of .arff files that would simply need a case number added
> t
Dear all,
I am reaching out to you because I have a small issue I need to deal with,
yet I feel that it requires pretty advanced coding to solve.
I have a whole lot of .arff files that would simply need a case number added
to every line of data.
I've been able to do this for 1 file, but now I