Answers for "python sort array in ascending order"

3

python sorted ascending

sorted_list = sorted(list)					# ascending (default)
sorted_list = sorted(list, reverse=True)    # descending
Posted by: Guest on May-13-2021
0

arrange array in ascending order python

myList = [1,5,3,4]
myList.sort()
print(myList)
#[1,3,4,5]
Posted by: Guest on November-08-2021

Code answers related to "python sort array in ascending order"

Python Answers by Framework

Browse Popular Code Answers by Language