[Tutor] [tutor] sort a list

emilia12 at mail.bg emilia12 at mail.bg
Sat Dec 23 10:39:22 CET 2006


Hi List,

I have a list like this x=[7,4,2,6]
and print x.sort()
gives to me None ! :

>> x=[7,4,2,6]
>> print x.sort()
None

... but

>> x=[7,4,2,6]
>> x.sort()
>> print x
[2, 4, 6, 7]

so, why list.sort() returns None? is this normal ?

(the python is "Python 2.4.3 (#69, Mar 29 2006, 17:35:34)
[MSC v.1310 32 bit (Intel)] on win32")

E.


-----------------------------

Започва новото голямо приключение!
Ерагон: от 15 декември в кината.
http://reklama.mail.bg/eragon/



More information about the Tutor mailing list