朱聖黎 <diggl...@gmail.com> added the comment:

I think it's an expected behavior.

`a.sort()` sorts the list itself in place, so it returns None.

If you want a sorted list returned, you need to use `sorted` function.

https://docs.python.org/3/library/functions.html#sorted

----------
nosy: +akarei

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40081>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to