I have a python script that creates a list of lists like so: Quant.append( [ db_ticker, stock_close, MTD, 0, QTD, 0, YTD, 0, 0, 0 ] )
After Quant is created, I want to sort it by MTD. If I use a simple Quant.sort(), I assume its going to sort by 'db_ticker' which is not what I want. I've been trying to figure out how to use the cmp() in a list sort method and I have failed to understand. Please help. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.10.8/71 - Release Date: 8/12/2005 _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor