giving range in sort function in python code example Example: sort an array python #List myList = [1,5,3,4] myList.sort() print(myList) #[1,3,4,5]