Confused about a list.sort()
wes weston
wweston at att.net
Wed Jan 28 10:22:05 EST 2004
Amy,
Switch from windoze to linux and provide screen dumps.
wes at linux:~> python
Python 2.3.3c1 (#3, Dec 26 2003, 16:36:50)
[GCC 3.3.1 (SuSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> list = [3,9,2]
>>> list.sort()
>>> list
[2, 3, 9]
Amy G wrote:
> 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?
>
>
More information about the Python-list
mailing list