Given the following dictionary:
dct = {'a':3, 'b':3,'c':5,'d':3}
How can I apply these values to a list such as:
lst = ['c', 'd', 'a', 'b', 'd']
in order to get something like:
lstval = [5, 3, 3, 3, 3]
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…