title: how to subset list base on array in python
body: <p>I have following column names in a list:</p>
  
  <pre><code> vars = ['age','balance','day','duration','campaign','pdays','previous','job_admin.','job_blue-collar']
  </code></pre>
  
  <p>I have one array which consists of array indexes </p>
  
  <pre><code>(array([1, 5, 7], dtype=int64),)
  </code></pre>
  
  <p>I want to subset the list based on array indexes</p>
  
  <p>Desired output should be</p>
  
  <pre><code>vars = ['balance','pdays','job_admin.']
  </code></pre>
  
  <p>I have tried something like this in python</p>
  
  <pre><code>for i, a in enumerate(X):
     if i in new_L:
         print i
  </code></pre>
  
  <p>But,it does not work. </p>