how to print sorted list in python code example
Example 1: how to sort a list in python
old_list = [3,2,1]
old_list.sort()
Example 2: sort list in python
List_name.sort()
This will sort the given list in ascending order.
old_list = [3,2,1]
old_list.sort()
List_name.sort()
This will sort the given list in ascending order.