Demo entry 3548895

string template example

   

Submitted by anonymous on Jan 20, 2016 at 01:19
Language: Python. Code size: 105 Bytes.

from string import Template

s = Template('$who likes $what')
s.substitute(who='yj', what='ice cream')

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).