鉴于此列表
my_lst = ['LAC', 'HOU', '03/03 06:11 PM', '2.13', '1.80', '03/03 03:42 PM']
我想根据字典值改变它的0th
和值:1st
def translate(my_lst):
subs = {
"Houston": "HOU",
"L.A. Clippers": "LAC",
}
所以列表变为:
['L.A. Clippers', 'Houston', '03/03 06:11 PM', '2.13', '1.80', '03/03 03:42 PM']