I\'ve been able to verify that the findUniqueWords
does result in a sorted list
. However, it does not return the list. Why?
def fin
Python habitually returns None
from functions and methods that mutate the data, such as list.sort
, list.append
, and random.shuffle
, with the idea being that it hints to the fact that it was mutating.
If you want to take an iterable and return a new, sorted list of its items, use the sorted
builtin function.