human
Program to find the XOR of ASCII values of characters in a string | Function to find the XOR of ASCII value of characters in str1ing.
store value of first character.
Traverse str1ing to find the XOR.
Return the XOR.
Driver code"
Solution in Python:
assistant
#Here is code to program to find the XOR of ASCII values of characters in a string and the other steps required.
 def XorAscii ( str1 , len1 ) :
	ans = ord ( str1 [ 0 ] )
	for i in range ( 1 , len1 ) :
		ans = ( ans ^ ( ord ( str1 [ i ] ) ) )
	return ans
str1 = " geeksforgeeks "
len1 = len ( str1 )
print ( XorAscii ( str1 , len1 ) )
str1 = " GfG "
len1 = len ( str1 )
print ( XorAscii ( str1 , len1 ) )