Skip to content

MojtabaShiri/sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

def sort_list(list1): i = len(list1)-1 while i > 0: index_max = 0 j = 0 while j <= i: if list1[j] > list1[index_max]: index_max = j j+=1 tmp = list1[index_max] list1[index_max] = list1[i] list1[i] = tmp i -= 1

list1=[2,3,7,1,0,-3,8,-8,10]

sort_list(list1)

print(list1)

Releases

No releases published

Packages

No packages published