why these 2 sorting is opposite in order
why these 2 sorting is opposite in order Question: I am implementing bubble sort in Python and used range for indexing the array: """ program to implement bubble sort """ a = [9,1,5,3,7,4,2,6,8] for i in range(len(a)): for j in range(i+1, len(a)): if a[i] > a[j]: a[i], a[j] = a[j], a[i] print(a) I got the …