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/344000.html below:

sorting tuples...

sorting tuples... sorting tuples...nidhog at gmail.com nidhog at gmail.com
Sat Sep 17 09:41:08 EDT 2005
Hello guys,

I made a script that extracts strings from a binary file. It works.

My next problem is sorting those strings.

Output is like:

---- snip ----
200501221530
John
*** long string here ***

200504151625
Clyde
*** clyde's long string here ***

200503130935
Jeremy
*** jeremy string here ****
---- snip ----

How can I go about sorting this list based on the date string that
marks the start of each message?

Should I be using lists, dictionaries or tuples?

What should I look into?

Is there a way to generate variables in a loop? Like:

x=0
while (x<10):
    # assign variable-x = [...list...]
    x = x+1

Thanks.


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