title: Python - Deleting names from a list inside a different document
body: <p>I found a better way doing this.</p>
  
  <pre><code># -*- coding: cp1252 -*-
  import random
  # Import a file with the names in class
  name = [i.strip().split() for i in open("input.txt").readlines()]
  # Draw a name
  a =(random.choice(name))
  # Print the name
  print a
  # Find the index from the list
  x = name.index(a)
  # Delete the name from the list 
  list.remove(x)
  </code></pre>
  
  <p>The input.txt is:</p>
  
  <pre><code>Andrew
  Andrea
  ....
  </code></pre>
  
  <p>Still what's the error here?</p>
  
  <p>When running I get this error:
  ['Andrew']</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\hey\Desktop\Program\test.py", line 9, in &lt;module&gt;
      list.remove(x)
  TypeError: descriptor 'remove' requires a 'list' object but received a 'int'
  </code></pre>