Palabras de Higlight en Python

from functools import reduce
from itertools import chain

text = 'left foot right foot left foot right. Feet in the day, feet at night.'
l1 = ['foot','feet']

print(reduce(lambda t, x: t.replace(*x), chain([text.lower()], ((t, colored(t,'white','on_red')) for t in l1)))) 
Foolish Flatworm