title: Removing elements from a list by index from another list of integers
body: <p>So I have two lists:</p>
  
  <pre><code>num = [
      3, 22, 23, 25, 28, 29, 56, 57, 67, 68, 73, 78, 79, 82, 83, 89, 90, 91,
      92, 98, 99, 108, 126, 127, 128, 131, 132, 133
  ]
  details = [
      'num=10,time=088', 'num=10,time=084', 'num=10,time=080', 'num=10,time=076',
      'num=10,time=072', 'num=10,time=068', 'num=10,time=064', 'num=10,time=060',
      'num=10,time=056', 'num=10,time=052', 'num=10,time=048', 'num=10,time=044',
      .
      .
      .
      .
      'num=07,time=280', 'num=07,time=276', 'num=05,time=508', 'num=05,time=504',
      'num=05,time=500', 'num=05,time=496'
  ]
  </code></pre>
  
  <p><code>num</code> has 28 elements and <code>details</code> has 134 elements. I want to remove elements in <code>details</code> by index based on values from <code>num</code>. For example elements with index 3, 22, 23, 25, 28... (these are numbers from <code>num</code> list) should be removed from <code>details</code>.</p>
  
  <p>When I use <code>.pop()</code> as it is described <a href="https://stackoverflow.com/questions/627435/how-to-remove-an-element-from-a-list-by-index-in-python">here</a> it gives me an error saying:</p>
  
  <pre class="lang-none prettyprint-override"><code>AttributeError: 'str' object has no attribute 'pop'
  </code></pre>
  
  <p>similarily when I use <code>del details[]</code> it gives me an error saying:</p>
  
  <pre class="lang-none prettyprint-override"><code>IndexError: list assignment index out of range
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>for an in details:
      an.pop(num)
  </code></pre>