There is I am sure an easy way to do this, but I seem to be brain dead 
tonight. So:

I have a table such that I can do

  [line for line  in table if line[7]=='JDOC']
and
  [line for line  in table if line[7]=='Aslib']
and
  [line for line  in table if line[7]=='ASLIB']
etc

I also have a dictionary
  r=  {'a':('ASLIB','Aslib'),'j':('JDOC', 'jdoc')}
so I can extract values
r.values()
[('ASLIB', 'Aslib'), ('JDOC', 'jdoc')]

I would like to do

[line for line  in table if line[7] in ('JDOC','jdoc','Aslib','ASLIB')]

so how should I get from
{'a':('ASLIB','Aslib'),'j':('JDOC','jdoc')}
to
('Aslib','ASLIB','JDOC','jdoc')



-- 
djc
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to