get the dictionary values for every key in a list,values = [d[k] for k in a]