<div>Thanks to everyone for your help and quick responses!</div> <div> </div> <div>Has anyone heard of the "bundle method?" Some of you have already said you didn't. I wonder why it's included as part of my code/instructions. I'm trying to accomplish what I 'think' they want with the other questions I've posed here.</div> <div> </div> <div>Here's my instruction:</div> <div>================</div> <div>#SUB-TASK 1: Fix the above to print/write only the keys with >0% missing, sorted alphabetically<BR>#by the key. (No need to use the "bundle method" for that). But ALSO append the<BR>#same information to outfile2, sorted by worst offender. (Use bundle for that).<BR>========================</div> <div> </div> <div>Just curious, but in this link (' <A href="http://xahlee.org/perl-python/sort_list.html">http://xahlee.org/perl-python/sort_list.html</A> ') you mentioned, what does the "<FONT style="BACKGROUND-COLOR:
#ffff00"><STRONG>re</STRONG></FONT>" part mean? At first I thought it was the name of the list or 'return' but that's included later.</div> <div> </div> <div> </div> <div>***************</div> <div> </div> <div><SPAN class=keyword>def</SPAN> <SPAN class=function-name>myComp</SPAN> (x,y):<BR> <SPAN class=keyword>import</SPAN> <STRONG><EM><FONT style="BACKGROUND-COLOR: #ffff00">re<BR></FONT></EM></STRONG> <SPAN class=keyword>def</SPAN> <SPAN class=function-name>getNum</SPAN>(str): <SPAN class=keyword>return</SPAN> float(re.findall(r<SPAN class=string>'\d+'</SPAN>,str)[0])<BR> <SPAN class=keyword>return</SPAN> cmp(getNum(x),getNum(y))<BR><BR>li.sort(myComp)<BR><SPAN class=keyword>print</SPAN> li <SPAN class=comment># returns ['web7-s.jpg', 'my23i.jpg', 'fris88large.jpg', 'my283.jpg']</SPAN><BR></div> <div>Thanks,</div> <div>Sara</div> <div> </div> <div>*********</div>
<div><BR><B><I>David Perlman <dperlman@wisc.edu></I></B> wrote:</div> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Maybe this reference will help:<BR>http://xahlee.org/perl-python/sort_list.html<BR>Just the first part of the discussion there.<BR><BR></BLOCKQUOTE><p> 
<hr size=1>We won't tell. Get more on <a href="http://us.rd.yahoo.com/evt=49980/*http://tv.yahoo.com/collections/265
">shows you hate to love</a><br>(and love to hate): <a href="http://us.rd.yahoo.com/evt=49980/*http://tv.yahoo.com/collections/265
">Yahoo! TV's Guilty Pleasures list.</a>