Function to store frequency of each character in each string
def frequency ( fre , s , n ) : NEW_LINE INDENT for i in range ( 0 , n ) : NEW_LINE INDENT string = s [ i ] NEW_LINE for j in range ( 0 , len ( string ) ) : NEW_LINE INDENT fre [ i ] [ ord ( string [ j ] ) - ord ( ' a ' ) ] += 1 NEW_LINE DEDENT DEDENT DEDENT