12. Python Lists - Sort(), Sorted & Reverse()

The following concise video provides practical demonstrations of Python’s sort(), sorted(), and reverse() methods to facilitate a quick and thorough understanding.

Sort - This method is specific to lists and modifies the original list directly.

Sorted - This function returns a new list containing the sorted elements. It is best for maintaining the original data while creating a sorted version.

Reverse - The most memory-efficient method which changes the list directly and does not return a new list. Since list.reverse() returns None, so you cannot assign its result to a new variable and expect a list value.

Table showing clear difference between Python Sort() & Python Sorted()