I think the problem may be that it's iterating through a list that you're changing.
Create a temporary copy of the list before, then copy back after like so:
# does not work
for i in range(len(num)): # i is the index of each digit
letters = numdict[int(num[i])]
templist = namelist[:] # create a direct copy of the list rather then referencing it
for name in namelist:
if name[i] not in letters:
templist.remove(name)
namelist = templist[:]
If that doesn't work, please post a runnable version of the code to demonstrate the problem. Right now I don't know how to piece your snippets together.