A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/350437.html below:

sorting tuples...

sorting tuples...nidhog at gmail.com nidhog at gmail.com
Wed Sep 21 09:36:13 EDT 2005
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


More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4