I am puzzled by the following:

Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600
64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> a_list = [5, 0, 2, 4, 1]
>>> print(a_list.sort())
None
>>> print(a_list)
[0, 1, 2, 4, 5]
>>>

I expected the first print statement to return what the second one
did. Apparently the first print printed a_list, then did the sort. Why
is this so?

-- 
boB
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to