In | Function to reverse arr [ ] from start to end ; Driver code
def revereseArray ( arr , n ) : NEW_LINE INDENT for i in range ( 0 , int ( n / 2 ) ) : NEW_LINE INDENT arr [ i ] , arr [ n - i - 1 ] = arr [ n - i - 1 ] , arr [ i ] NEW_LINE DEDENT DEDENT if __name__ == " _ _ main _ _ " : NEW_LINE INDENT arr = [ 1 , 2 , 3 , 4 , 5 , 6 ] NEW_LINE n = len ( arr ) NEW_LINE print ( * arr ) NEW_LINE revereseArray ( arr , n ) NEW_LINE print ( " Reversed ▁ array ▁ is " ) NEW_LINE print ( * arr ) NEW_LINE DEDENT