📅  最后修改于: 2022-03-11 14:45:55.475000             🧑  作者: Mango
from string import Template
poem = Template('$x are red and $y are blue')
print(poem.substitute(x='roses', y='violets'))
#>>>roses are red and violets are blue