4 ms·
> It is not "just because", it is because it returns a sorted list (which is exactly what you wanted), compared to returning None. Also because `sorted()` work
by masklinn 10y ago
> It is not "just because", it is because it returns a sorted list (which is exactly what you wanted), compared to returning None.
Also because `sorted()` works on any iterable, whereas .sort only works on lists.