human
Next Greater Element | Function to print element and NGE pair for all elements of list.
Driver program to test above function"
How can the above be solved in Python?
 What is a code to next Greater Element and the other steps required?
assistant
#Here is code to next Greater Element and the other steps required.
 def printNGE ( arr ) :
	for i in range ( 0 , len ( arr ) , 1 ) :
		next = - 1
		for j in range ( i + 1 , len ( arr ) , 1 ) :
			if arr [ i ] < arr [ j ] :
				next = arr [ j ]
				break
		print ( str ( arr [ i ] ) + " ▁ - - ▁ " + str ( next ) )
arr = [ 11 , 13 , 21 , 3 ]
printNGE ( arr )