human
Find minimum difference between any two elements | Returns minimum difference between any pair.
Initialize difference as infinite.
Find the min diff by comparing difference of all possible pairs in given array.
Return min diff.
Driver code"
How can the above be solved in Python?
 ... Give me a code to find minimum difference between any two elements and the other steps required?
assistant
#Here is code to find minimum difference between any two elements and the other steps required.
 def findMinDiff ( arr , n ) :
	diff = 10 ** 20
	for i in range ( n - 1 ) :
		for j in range ( i + 1 , n ) :
			if abs ( arr [ i ] - arr [ j ] ) < diff :
				diff = abs ( arr [ i ] - arr [ j ] )
	return diff
arr = [ 1 , 5 , 3 , 19 , 18 , 25 ]
n = len ( arr )
print ( " Minimum ▁ difference ▁ is ▁ " + str ( findMinDiff ( arr , n ) ) )