I have a dictionary:
d = {'a': 1, 'b': 2, 'c': 3}
and a list:
l = ['a', 'c']
How do I obtain a list of the dictionary values from the list above? i.e. I want:
[1, 3]
I've tried:
d[l]
but get the following error: TypeError: unhashable type: 'list'.