human
Write me a code to count substrings of a given string whose anagram is a palindrome and the other steps required given the following:
Count substrings of a given string whose anagram is a palindrome | Function to prcount of subStrings whose anagrams are palindromic.
Stores the answer.
Iterate over the String.
Set the current character.
Parity update.
Print final count.
Driver Code.
Function Call"
Solution in Python:
assistant
#Here is code to count substrings of a given string whose anagram is a palindrome and the other steps required.
 def countSubString ( s ) :
	res = 0 ;
	for i in range ( len ( s ) ) :
		x = 0 ;
		for j in range ( i , len ( s ) ) :
			temp = 1 << ord ( s [ j ] ) - ord ( ' a ' ) ;
			x ^= temp ;
			if ( ( x & ( x - 1 ) ) == 0 ) :
				res += 1 ;
	print ( res ) ;
if __name__ == ' _ _ main _ _ ' :
	str = " aaa " ;
	countSubString ( str ) ;