Python MongoDB Sort

The sort() method is used to sort the result in ascending or descending order.

Code :