title: Replacing a string in HTML file in Python
body: <p>I'm trying to replace a string stored in a list with an HTML tag in a file by doing:</p>
  <pre><code>    links=[&lt;a href=&quot;http://hexagon-dashboard-gbc-01/vboard/latest?regs=3281546&quot;&gt;http://hexagon-dashboard-gbc-01/vboard/latest?regs=3281546&lt;!--V68NUR--&gt;&lt;/a&gt;]
     str1=&quot;&quot;&quot;&lt;a href=&quot;%s&quot;&gt;%s&lt;!--V68NUR--&gt;&lt;/a&gt;&quot;&quot;&quot;%(vboard['V68N']['perf.tl'],vboard['V68N']['perf.tl'])
       with open(html_file,'r+') as f:
                  content = f.read()
                  f.seek(0)
                  f.truncate()
                  f.write(content.replace(links[0],str1))
                  
  </code></pre>
  <p>But I get the following error:</p>
  <blockquote>
  <p>TypeError: replace() argument 1 must be str, not Tag.</p>
  </blockquote>
  <p>What am I missing? Please help me with the modification I have to do.</p>