In python... I have a list of elements \'my_list\', and a dictionary \'my_dict\' where some keys match in \'my_list\'.
I would like to search the dictionary and retrieve
new_dict = dict((k, v) for k, v in dict.iteritems() if k in list)
Turning list into a set set(list) may yield a noticeable speed increase
set(list)