title: replace placeholder tags with dictionary fields in python
body: <p>this is my code so far:</p>
  
  <pre><code>import re
  template="Hello,my name is [name],today is [date] and the weather is [weather]"
  placeholder=re.compile('(\[([a-z]+)\])')
  find_tags=placeholder.findall(cam.template_id.text)
  fields={field_name:'Michael',field_date:'21/06/2015',field_weather:'sunny'}
  
  for key,placeholder in find_tags:
  assemble_msg=template.replace(placeholder,?????)
  print assemble_msg
  </code></pre>
  
  <p>I want to replace every tag with the associated dictionary field and the final message to be like this:
  My name is Michael,today is 21/06/2015 and the weather is sunny.
  I want to do this automatically and not manually.I am sure that the solution is simple,but I couldn't find any so far.Any help?</p>