Remplacez plusieurs éléments dans une liste Python

mapping = {
    '1': 'i',
    '2': 'put',
    '3': 'this',
    '4': 'here',
}
sentence = ['1', '2', '3', '4']
newsentence = [mapping.get(word, word) for word in sentence]
# ['I', 'put', 'this', 'here']
Lazy Leopard