title: Using string templates for making a quine in python?
body: <p>I'm basically trying to make a quine in python and first tried with f-strings, but I quickly realized that I first have to define the variables I want to format inside the string. I then learned about string templates and figured that would be the way to go. I am however not that experienced with it and could need some help. Any suggestions?</p>
  <p>Here's the actual code:</p>
  <pre><code>from string import Template
  s=&quot;from string import Template\ns=$s\nt=Template($s).substitute(s=$s)\nprint($s)&quot;
  t=Template(s).substitute(s=s)
  print(s)
  </code></pre>
  <p>It gives me somewhat of the right result. The only problem is that it's not replacing the <code>$s</code> with the actual string. I've might just have misunderstood the whole concept with quines and the method of doing them but I feel this should work.</p>
  <p>Output:</p>
  <pre><code>from string import Template
  s=$s
  t=Template($s).substitute(s=$s)
  print($s)
  </code></pre>