Confused about a list.sort()

Terry Reedy tjreedy at udel.edu
Tue Jan 27 21:47:33 EST 2004


"Amy G" <amy-g-art at cox.net> wrote in message
news:S6FRb.2098$P17.1139 at fed1read03...
> I have a list of numbers... actully I have two lists, List 1 is a list of
> number strings and List2 is one of numbers.
>
> List 1 example:
> List1 = [ '20040124123000', '20040124123001', '20040125012456']
>
> List 2 example:
> List2 = [ 20040124123000L, 20040124123001L, '20040125012456L]
>
> When I try either:
> List1 = List1.sort ... or
> List2 = List2.sirt
>
> and then...
> print List1... or
> print List2
>
> I get None.
>
> Why is this?
> How do I remedy this problem?

Read the library reference manual on builtin objects - sequences -  lists -
methods.

Seriously.

TJR







More information about the Python-list mailing list