<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 28, 2013 at 2:14 PM, io <span dir="ltr"><<a href="mailto:maroso@libero.it" target="_blank">maroso@libero.it</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
i have to files.<br>
<br>
First file is a csv file<br>
Second file is a plain text file where each row has a value (text)<br></blockquote><div><br></div><div>Read the second file so that you have a list of each of its values<br><br></div><div>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. <br>
<br></div><div>You should look up split method on strings to split a string separated by whitespace.<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I want to be able to create a third file using data from the first file<br>
excluding the values listed in the second file.<br>
<br>
Example:<br>
<br>
First file:<br>
-----------<br>
<br>
mtgoxeur        12      24      36<br>
mtgoxusd        10      12      14<br>
mtgoxpln        2       4       6<br>
<br>
<br>
Second file:<br>
------------<br>
<br>
mtgoxusd<br>
<br>
<br>
<br>
Third File (the resulting one) :<br>
--------------------------------<br>
<br>
mtgoxeur        12      24      36<br>
mtgoxpln        2       4       6<br>
<br>
<br>
<br>
Thanks to anyone that can help<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><div>Joel Goldstick<br></div><a href="http://joelgoldstick.com" target="_blank">http://joelgoldstick.com</a><br></div>
</div></div>