human
Find a pair with the given difference | The function assumes that the array is sorted.
Initialize positions of two elements.
Search for a pair.
Driver function to test above function"
How can the above be solved in Python?

=====
What is a code to find a pair with the given difference and the other steps required?
assistant
#Here is code to find a pair with the given difference and the other steps required.
 def findPair ( arr , n ) :
	size = len ( arr )
	i , j = 0 , 1
	while i < size and j < size :
		if i != j and arr [ j ] - arr [ i ] == n :
			print " Pair ▁ found ▁ ( " , arr [ i ] , " , " , arr [ j ] , " ) "
			return True
		elif arr [ j ] - arr [ i ] < n :
			j += 1
		else :
			i += 1
	print " No ▁ pair ▁ found "
	return False
arr = [ 1 , 8 , 30 , 40 , 100 ]
n = 60
findPair ( arr , n )