You are viewing a single comment's thread. Return to all comments →
def number_needed(a, b): delete = 0 chars = set(list(a) + list(b))
for c in chars: delete += abs(list(a).count(c) - list(b).count(c)) return delete
Seems like cookies are disabled on this browser, please enable them to open this website
Strings: Making Anagrams
You are viewing a single comment's thread. Return to all comments →
def number_needed(a, b): delete = 0 chars = set(list(a) + list(b))