title: How to detect with python if the string contains html code?
body: <p>How to detect either the string contains an html (can be html4, html5, just partials of html within text)? I do not need a version of HTML, but rather if the string is just a text or it contains an html. Text is typically multiline with also empty lines</p>
  
  <h1>Update:</h1>
  
  <p>example inputs:</p>
  
  <p>html:</p>
  
  <pre><code>&lt;head&gt;&lt;title&gt;I'm title&lt;/title&gt;&lt;/head&gt;
  Hello, &lt;b&gt;world&lt;/b&gt;
  </code></pre>
  
  <p>non-html:</p>
  
  <pre><code>&lt;ht fldf d&gt;&lt;
  &lt;html&gt;&lt;head&gt; head &lt;body&gt;&lt;/body&gt; html
  </code></pre>