title: changing a list of lists and make a new one in python
body: <p>I have a big list of lists like this small example:</p>
  
  <pre><code>small example:
  
  mylist = [['D00645:305:CCVLRANXX:2:2110:19904:74155', '272', 'chr1', '24968', '0', '32M', '*', '0', '0', 'GACAACACAGCCCTCATCCCAACTATGCACAT'], ['D00645:305:CCVLRANXX:2:2201:12674:92260', '256', 'chr1', '24969', '0', '31M', '*', '0', '0', 'ACAACACAGCCCTCATCCCAACTATGCACAT']
  </code></pre>
  
  <p>and I want to make a sub list of lists with the same number of inner lists. but I will change the inner lists. in the new list of lists, the inner list would have 6 columns. </p>
  
  <pre><code>1st column : the 3rd column of old inner list. they start with 'chr' 
  2nd column : (the 4rh column in old inner list) - 1
  3rd column : ((the 4rh column in old inner list) - 1) + length (10th column in old inner list)
  4th column : the 1st column in old inner list
  5th column : only 0. as integer
  6th column : should be "+" or "-". if in old inner list the 2nd column is 272, in new inner list 6th column would be "-" otherwise that should be "+". 
  </code></pre>
  
  <p>the new list of lists will look like this:</p>
  
  <pre><code>newlist = [['chr1', 24967, 24999, 'D00645:305:CCVLRANXX:2:2110:19904:74155', 0, "-"], ['chr1', 24968, 24999, 'D00645:305:CCVLRANXX:2:2201:12674:92260', 0, "+"]]
  </code></pre>
  
  <p>I am trying to do that in <code>python</code> using the following command but it does not work like what I want. do you know how to fix it?</p>
  
  <pre><code>newlist = []
  for i in mylist:
      if i[1] ==272:
          sign = '-'
      else:
          sign = '+'
      newlist.append(i[2], int(i[3])-1, int(i[3])-1+len(i[9]), i[0], 0, sign)
  </code></pre>