...snip... > To save anybody who's tempted to write the whole shebang for you, > please specify which part(s) of the exercise you are having problems > with: > (a) reading lines from a file > (b) extracting a sort key from a line [presuming "number" means > "positive integer"; what do you want to do if multiple lines have the > same number? what if no number at all"] > (c) creating a list of tuples, where each tuple is (key, > line_contents) > (d) sorting the list > (e) creating the output file from the sorted list.
Thanks, you've done more than enough right here! (a) through (e) gives me a good start. Again, thank you for this. -- http://mail.python.org/mailman/listinfo/python-list