Driver code
a = [ 5 , 1 , 4 , 2 , 8 , 0 , 2 ] NEW_LINE cocktailSort ( a ) NEW_LINE print ( " Sorted ▁ array ▁ is : " ) NEW_LINE for i in range ( len ( a ) ) : NEW_LINE INDENT print ( " % ▁ d " % a [ i ] ) NEW_LINE DEDENT