4 ms·
They return a value, like functions.
They return a value, like functions.
Is this not normal?
deleted 6y ago
[deleted]
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)`.