human
Elements greater than the previous and next element in an Array | Function to print elements greater than the previous and next element in an Array.
Traverse array from index 1 to n - 2 and check for the given condition.
Driver Code"
Solution in Python:

=====
Write me a code to elements greater than the previous and next element in an Array and the other steps required?
assistant
#Here is code to elements greater than the previous and next element in an Array and the other steps required.
 def printElements ( arr , n ) :
	for i in range ( 1 , n - 1 , 1 ) :
		if ( arr [ i ] > arr [ i - 1 ] and arr [ i ] > arr [ i + 1 ] ) :
			print ( arr [ i ] , end = " ▁ " )
if __name__ == ' _ _ main _ _ ' :
	arr = [ 2 , 3 , 1 , 5 , 4 , 9 , 8 , 7 , 5 ]
	n = len ( arr )
	printElements ( arr , n )