I am starting to learn Python.
Can someone explain why sort() returns None?
alist.sort() ## correct alist = blist.sort() ## NO incorrec
When you want to perform the sorting on same list then you have to use sort() method of list. But If you dont want to change the sequence of original list but you need a sorted copy of the original list then use sorted() inbuilt function.
sort()
sorted()