On Thu, Feb 28, 2013 at 2:14 PM, io <mar...@libero.it> wrote: > Hi, > > i have to files. > > First file is a csv file > Second file is a plain text file where each row has a value (text) >
Read the second file so that you have a list of each of its values Read the first file line by line. Check if the value at the beginning of the line is in the list of values from the second file. If not, print it to outfile. You should look up split method on strings to split a string separated by whitespace. > > I want to be able to create a third file using data from the first file > excluding the values listed in the second file. > > Example: > > First file: > ----------- > > mtgoxeur 12 24 36 > mtgoxusd 10 12 14 > mtgoxpln 2 4 6 > > > Second file: > ------------ > > mtgoxusd > > > > Third File (the resulting one) : > -------------------------------- > > mtgoxeur 12 24 36 > mtgoxpln 2 4 6 > > > > Thanks to anyone that can help > > > -- > http://mail.python.org/mailman/listinfo/python-list > -- Joel Goldstick http://joelgoldstick.com
-- http://mail.python.org/mailman/listinfo/python-list