goldgod a wrote: > hello all, > Please find the attached file. I want to sort the content > of this file based on the "bytes" in descending order. How can i do > it, any pointers to it.
There are several things to do here: - read the file - split into records - extract the byte count - sort - write the file in sorted order Which parts are you having trouble with? What have you tried? File reading and writing are covered in any Python tutorial. For the sort, I would make a list of ( byte count, record ) and sort that using the list.sort() method. Kent _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
