(list, n)
| 18 | |
| 19 | # sort a list by a given field |
| 20 | def sortBy(list, n): |
| 21 | nlist = map(lambda x, n=n: (x[n], x), list) |
| 22 | nlist.sort() |
| 23 | return map(lambda (key, x): x, nlist) |
| 24 | |
| 25 | if ( len(sys.argv) != 2 ): |
| 26 | print "You must pass one input file to this program. That file" |
no test coverage detected