For every character , present in s1 , reduce its count if count is more than 0.
for i in range ( len ( s1 ) ) : NEW_LINE INDENT if ( count [ ord ( s1 [ i ] ) ] == 0 ) : NEW_LINE INDENT return False NEW_LINE DEDENT count [ ord ( s1 [ i ] ) ] -= 1 NEW_LINE DEDENT return True NEW_LINE