Bubble sort - Harshilo Juna hua
#Bubble Sort
List1=[56,41,25,26,24]
Length=len(List1)
for i in range(Length):
for j in range(0,Length-i-1):
if List1[j]>List1[j+1]:
List1[j],List1[j+1]=List1[j+1],List1[j]
print (List1)
Comments
Post a Comment