Determine whether a magazine contains the words needed for a ransom note
You're making it enormously complicated. This is a job for Counter:
from collections import Counter

def checkMagazine(magazine, note):
    print('No' if Counter(note) - Counter(magazine) else 'Yes')