3 ms·
No, it is not. Python's `my_list.sort()` will sort the list in-place without returning the sorted list. If I wanted to have a return value (without changing the
by submeta 6y ago
No, it is not. Python's `my_list.sort()` will sort the list in-place without returning the sorted list. If I wanted to have a return value (without changing the original list), I'd have to use `sorted(my_list)`.