From the python documentation:
7.
Thesort()
andreverse()
methods modify the list in place for economy of space when sorting or reversing a large list. To remind you that they operate by side effect, they don’t return the sorted or reversed list.
Use sorted()
:
list_sorted = list(sorted(list_of_strings))