On 14/08/15 05:07, Jason Brown wrote:
for file_list in filenames:
with open(file_list) as files:
for items in vals:
for line in files:
Others have commented on your choice of names.
I'll add one small general point.
Try to match the plurality of your names to the
nat
Jason Brown wrote:
> (accidentally replied directly to Cameron)
>
> Thanks, Cameron. It looks like that value_file.close() tab was
> accidentally tabbed when I pasted the code here. Thanks for the
> suggestion
> for using 'with' though! That's will be handy.
>
> To test, I tried manually spec
(accidentally replied directly to Cameron)
Thanks, Cameron. It looks like that value_file.close() tab was
accidentally tabbed when I pasted the code here. Thanks for the suggestion
for using 'with' though! That's will be handy.
To test, I tried manually specifying the list:
vals = [ 'value1',
On 13Aug2015 16:48, Jason Brown wrote:
I'm trying to search for list values in a set of files. The goal is to
generate a list of lists that can later be sorted. I can only get a match
on the first value in the list:
contents of value_file:
value1
value2
value3
...
The desired output is:
fil
Hi,
I'm trying to search for list values in a set of files. The goal is to
generate a list of lists that can later be sorted. I can only get a match
on the first value in the list:
contents of value_file:
value1
value2
value3
...
The desired output is:
file1 value1
file1 value2
file2 value3
f