<div dir="ltr"><span style="font-size:12.8000001907349px">Line 7 to 9 in your code do not make sense. </span><div><span style="font-size:12.8000001907349px">For example in  line 7, you cannot split 'list' as it is a keyword<br></span><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Try this:</span><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px"><div>fh=open(file,'r')</div><span class="im"><div>lst = list()</div><div>for line in fh:</div></span><div>    lst.append(line.split())</div><div>    </div><div># Merge list of lists</div><div>slist=[item for sublist in lst for item in sublist]</div><div># Sort list</div><div>slist.sort() </div><div>print line.rstrip()</div><div>fh.close()</div></div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Phu</div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 28, 2015 at 4:39 PM,  <span dir="ltr"><<a href="mailto:ltc.hotspot@gmail.com" target="_blank">ltc.hotspot@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-size:12px;color:#777;font-family:'Lucida Grande',Helvetica,Arial,sans-serif;background-color:#fff;padding:4px">
<a href="https://www.boxbe.com/overview" style="text-decoration:none;color:#5e96ea" target="_blank"><img alt="Boxbe" src="http://www.boxbe.com/images/logo_dark_small.png" width="64px" style="margin-left:0px;border:none"></a>

<img src="http://www.boxbe.com/stfopen?tc_serial=22116012251&tc_rand=236919732&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001">

This message is eligible for Automatic Cleanup! (<a href="mailto:ltc.hotspot@gmail.com" target="_blank">ltc.hotspot@gmail.com</a>) 
<a style="text-decoration:none;color:#5e96ea" href="https://www.boxbe.com/popup?url=https%3A%2F%2Fwww.boxbe.com%2Fcleanup%3Ftoken%3DI07KxbtM55%252BQjgc5o7O%252FykRkRr4DGMlJCx1zsA0hPf8ak7WqQjOGHdWxM9JQj481%252FKKxcWUOuF3BtafIjGm4%252F1CYBYSf%252FWHpCj9LhXxV1jJnf%252B4DFFWW8gyIULP9dS%252BUy8R4hFYgiAhF5ahgbqjBSA%253D%253D%26key%3DEYEB2V971J9rUqgQB1UBTUDFbRnDbLfSIWPR7D9INgE%253D&tc_serial=22116012251&tc_rand=236919732&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001" title="Add a new automatic cleanup rule" target="_blank">Add cleanup rule</a>
 | <a style="text-decoration:none;color:#5e96ea" href="http://blog.boxbe.com/general/boxbe-automatic-cleanup?tc_serial=22116012251&tc_rand=236919732&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001" title="Get info on automatic cleanup" target="_blank">More info</a>
<br>

    </div>

<br>




<div dir="ltr">
<div dir="ltr" style="font-family:'Calibri','Segoe UI','Meiryo','Microsoft YaHei UI','Microsoft JhengHei UI','Malgun Gothic','sans-serif';font-size:12pt"><div><br></div><div><br></div><div>Hi Everyone:</div><div><br></div><div>What is the source of the syntax error to the String Attribute?</div><div><br></div><div><br>Go to the following URL links and view a copy of the raw data file code and sample data: </div><div><br></div><div>1.) <a href="http://tinyurl.com/p2xxxhl" target="_blank">http://tinyurl.com/p2xxxhl</a><br>2.) <a href="http://tinyurl.com/nclg6pq" target="_blank">http://tinyurl.com/nclg6pq</a></div><div><br></div><div>Here is the desired output:</div><div><br></div><div><a href="mailto:stephen.marquard@uct.ac.za" target="_blank">stephen.marquard@uct.ac.za</a><br><a href="mailto:louis@media.berkeley.edu" target="_blank">louis@media.berkeley.edu</a><br>....</div><div><br></div><div><br>Hal<br></div><div><div><br></div><div>Sent from Surface</div><div><br></div></div></div>
</div>

<br>_______________________________________________<br>
Baypiggies mailing list<br>
<a href="mailto:Baypiggies@python.org">Baypiggies@python.org</a><br>
To change your subscription options or unsubscribe:<br>
<a href="https://mail.python.org/mailman/listinfo/baypiggies" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/baypiggies</a><br>
<br></blockquote></div><br></div>