title: Python Triple-quoted strings with variable
body: <p>Trying to <code>write</code> to a file with variables, but that is returning error:</p>
  
  <pre><code>template = """1st header line
  second header line
  There are people in rooms
  and the %s
  """
  with  open('test','w') as myfile:
      myfile.write(template.format()) % (variable)
  </code></pre>