human
Find extra element in the second array | Function to return the extra element in B [ ].
To store the result.
Find the XOR of all the element of array A [ ] and array B [ ].
Driver code"
How can the above be solved in Python?
assistant
#Here is code to find extra element in the second array and the other steps required.
 def extraElement ( A , B , n ) :
	ans = 0 ;
	for i in range ( n ) :
		ans ^= A [ i ] ;
	for i in range ( n + 1 ) :
		ans ^= B [ i ] ;
	return ans ;
A = [ 10 , 15 , 5 ] ;
B = [ 10 , 100 , 15 , 5 ] ;
n = len ( A ) ;
print ( extraElement ( A , B , n ) ) ;