A function to implement bubble sort
def __init__ ( self , array ) : NEW_LINE INDENT self . array = array NEW_LINE self . length = len ( array ) NEW_LINE DEDENT def __str__ ( self ) : NEW_LINE INDENT return " ▁ " . join ( [ str ( x ) for x in self . array ] ) NEW_LINE DEDENT def bubbleSortRecursive ( self , n = None ) : NEW_LINE INDENT if n is None : NEW_LINE INDENT n = self . length NEW_LINE DEDENT DEDENT