Let's say I have a list:
a = ['apple', 'orange']
and a dictionary:
d ={'apple': [2,4], 'carrot': [44,33], 'orange': [345,667]}
How can I use the list a as a key to lookup in the dictionary d? I want the result to be written to a comma-separated textfile like this
apple, orange
2, 44
4, 33