Thank you very much. I'll look into this immediately.
I edited my code earlier and came up with stringing the groups (200501202010, sender, message_string) into one string delimited by '%%%'. I could then sort the messages with the date string at the beginning as the one being sorted with the big string in its "tail" being sorted too. 200501202010%%%sender%%%message_string 200502160821%%%sender%%%message_string ... After sorting this list of long strings, I could then split them up using the '%%%' delimiter and arrange them properly for output. It's crude but at least I achieve what I wanted done. But both posters gave good advices, if not a bit too advanced for me. I'll play with them and keep tweaking my code. Thanks so much! -- /nh -- http://mail.python.org/mailman/listinfo/python-list