Q:

Matching lists when elements are not ordered

let's say I have a list b=['m','NN'] and a dictionary dict={'b':['NN','m','big']} and I want to use the function to retrieve the key 'b' if the elements of the list b are in dict[b]
(so let's say using [k for k,v in dict.items()]. 
Now how do I do that if the elements in b are not ordered as the elements in dict[b] and supposing I cannot change the order in the b list? 
Thank you! 

A:

Not certain I understand what you're asking, but if what you're after is the list of keys in dictionary d with values which are super-sets of the list b, you could use something like:
b=['m','NN']
d={'b':['NN','m','big'], 'a':['jj','r']}
[k for k,v in d.items() if set(b) <= set(v)]

(I changed the name of your example dictionary as dict is a built-in class.) 

A:

You can do:
 [k for k, v in dict.items() if all((x in v) for x in b)]

For example:
>>> b=['m','NN']
>>> dict={'b':['NN','m','big'], 'a':['NN', 'q']}
>>> [k for k, v in dict.items() if all((x in v) for x in b)]
['b']

(Note that it is a bad idea to name your dictionary dict, since dict is the name of the data type).