3 ms·
The reason .sort() doesn't return anything is because it sorts in place. That way you won't get confused between the returned list and the sorted one. Maybe yo
by aston 16y ago
The reason .sort() doesn't return anything is because it sorts in place. That way you won't get confused between the returned list and the sorted one.
Maybe you're looking for sorted(dir(<obj>)), which gives back a new list?