human
Sum of frequencies of characters of a string present in another string | Function to find sum of frequencies of characters of S1 present in S2.
Insert all characters of string S1 in the set.
Traverse the string S2.
Check if X is present in bset or not.
Increment count by 1.
Finally , print the count.
Given strings"
How can the above be solved in Python?
assistant
#Here is code to sum of frequencies of characters of a string present in another string and the other steps required.
 def countTotalFrequencies ( S1 , S2 ) :
	bset = set ( S1 )
	count = 0
	for x in S2 :
		if x in bset :
			count += 1
	print ( count )
S1 = " geEksFOR "
S2 = " GeEksforgeEKS "
countTotalFrequencies ( S1 , S2 )