title: Remove element from a list generated with range in python?
body: <p>Here's a simple program:</p>
  
  <pre><code>#!/usr/bin/env python3
  
  l = list(range(5))
  print(l, type(l))
  
  l = list(range(5)).remove(2)
  print(l, type(l))
  </code></pre>
  
  <p>for some reason the list is destroyed on removing the element:</p>
  
  <pre><code>[0, 1, 2, 3, 4] &lt;class 'list'&gt;
  None &lt;class 'NoneType'&gt;
  </code></pre>
  
  <p>(it is program output)</p>
  
  <p>I expected it to output</p>
  
  <pre><code>[0, 1, 3, 4]
  </code></pre>
  
  <p>What is wrong, and how do I remove the element from a list generated with <code>range</code>?</p>