def bubblesort(a):
 for i in range(len(a)):
  for j in range(i, len(a)):
   if (a[i] > a[j]):
    (a[i], a[j]) = (a[j], a[i])
 return a

def bubblesort ( a ) : for i in range ( len ( a ) ) : for j in range ( i , len ( a ) ) : if ( a [ i ] > a [ j ] ) : ( a [ i ] , a [ j ] ) = ( a [ j ] , a [ i ] ) return a
bubble sort implementation .