String Python Tutorial

from string  import Template
s = Template('$x, glorious $x!')
s.substitute(x='slurm')
print s