You are viewing a single comment's thread. Return to all comments →
I did it like Harold would do. Cutting out every word needed from magazine until failing to find it.
def checkMagazine(magazine, note): try: for w in note: magazine.remove(w) print 'Yes' except ValueError: print 'No'
Hash Tables: Ransom Note
You are viewing a single comment's thread. Return to all comments →
I did it like Harold would do. Cutting out every word needed from magazine until failing to find it.