In order to insert a dollar sign, use $$ : Template : String PYTHON TUTORIALS


PYTHON TUTORIALS » String » Template »

 

In order to insert a dollar sign, use $$


from string import Template


s = Template("Make $$ selling $x!")
s.substitute(x='slurm')
print s



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo String
» Template