Count the number of occurrences of ' a ' and ' b ' in s2
for i in range ( len ( s2 ) ) : NEW_LINE INDENT if ( s2 [ i ] == ' a ' ) : NEW_LINE INDENT count_a2 += 1 NEW_LINE DEDENT else : NEW_LINE INDENT count_b2 += 1 NEW_LINE DEDENT DEDENT