iterating over the map
for value in freq . values ( ) : NEW_LINE INDENT if ( value % 2 == 1 ) : NEW_LINE INDENT count += 1 NEW_LINE DEDENT DEDENT if ( count > k ) : NEW_LINE INDENT print ( " No " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " Yes " ) NEW_LINE DEDENT