I am starting to learn Python.
Can someone explain why sort() returns None?
alist.sort() ## correct
alist = blist.sort() ## NO incorrect, sort() returns None
Why shouldn't
alist = blist.sort()
return the sorted list and give it back to alist? This does not make sense to me.
Thanks.
sorted('FMRT', key=lambda x: ord(x) % 16)