title: How to convert data in txt form into a list in python
body: <p>For example this is my data in <code>txt</code> file:</p>
  <pre><code>Chair
  Table
  Planks
  Door
  </code></pre>
  <p>Each separated by a new line.
  So how do I convert it into a <code>list</code> so that it's output would be like this:</p>
  <pre class="lang-py prettyprint-override"><code>['Chair', 'Table', 'Planks', 'Door'] 
  </code></pre>
  <p>Every time I try to convert it into a <code>list</code>, it's new line character getting printed in the <code>list</code> as well.</p>
  <p>I tried this code by new line character keeps adding</p>
  <pre><code>for line in filen:
      setn.add(line)
  for items in setn:
      items.replace(&quot; &quot;, &quot;&quot;)
  </code></pre>