human
Find all possible pairs with given Bitwise OR and Bitwise XOR values | Function to find pairs with XOR equal to A and OR equal to B.
Iterate from 1 to B.
Check if ( i OR y ) is B.
Driver Code"
How can the above be solved in Python?

Give me a code to find all possible pairs with given Bitwise OR and Bitwise XOR values and the other steps required?
assistant
#Here is code to find all possible pairs with given Bitwise OR and Bitwise XOR values and the other steps required.
 def findPairs ( A , B ) :
	for i in range ( 1 , B + 1 ) :
		y = A ^ i
		if ( y > 0 and ( i y ) == B ) :
			print ( i , " ▁ " , y )
A = 8
B = 10
findPairs ( A , B )