I would like to find the intersection of lists that are stored within the defaultdict(list)
container. Here is my dictionary, 'd'
a list of lookup values, 'my_list':
d = { a: ['1', '2', '3'],
b: ['3', '4', '5'],
c: ['3', '6', '7']
}
my_list = ['a', 'b']
I would like to return the intersection of the lists. Based on a previous post I tried the following but get an error: TypeError: unhashable type: 'list'
set.intersection(*map(set,d[my_list]))
any suggestions would be welcome.
thanks, zach cp