Python Sort() method [duplicate]

alist.sort() sorts alist in-place, modifying alist itself.

If you want a new list to assign somewhere, use blist = sorted(alist)

Leave a Comment