0
What does Sort and Reverse do in Python?
when Doing a list what does Sort do
1 Answer
+ 2
Sort, get the elements of list, compare 'em all n arrange them in a sorted manner i.e., ascending or descending.
Reverse, get all the elements of list and swap their positions front to back i.e., the element or value in first position of list will go back to the last position and the 2nd will go to the 2nd last position and so on...