title: How to change list into HTML table ? (Python)
body: <p>This is what I have done when there is no HTML codes</p>
  
  <pre><code>from collections import defaultdict
  
  hello = ["hello","hi","hello","hello"]
  def test(string):
      bye = defaultdict(int)
      for i in hello:
          bye[i]+=1
      return bye
  </code></pre>
  
  <p>And i want to change this to html table and This is what I have try so far, but it still doesn't work</p>
  
  <pre><code> def test2(string):
      bye= defaultdict(int)
      print"&lt;table&gt;"
      for i in hello:
          print "&lt;tr&gt;"
          print "&lt;td&gt;"+bye[i]= bye[i] +1+"&lt;/td&gt;"
          print "&lt;/tr&gt;"
      print"&lt;/table&gt;"
      return bye
  </code></pre>
  
  <p>​ </p>