title: Understanding a line of code
body: <p>I have been given, by someone else, a line of code that I am having trouble understanding.</p>
  
  <pre><code>inputString = "[1,2,3,4,5,6,7,8,9,10,11,12]"
  
  a = inputString[1:-1].split(',')
  z = zip(a[::2],a[1::2]) # this line
  print a
  print z
  </code></pre>
  
  <p>I understand the <code>split</code> function and how that is operating. I even understand the <code>zip</code> function. What I don't understand is what <code>a[::2],a(1::2)</code> is doing. I have tried modifying these bits of code and get varying results, but nothing that allows me to comprehend what modifying the code does. I am fairly new at Python, and could use a little help.</p>
  
  <p>Typical, unmodified result from the code looks like this:</p>
  
  <pre><code>['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']
  [('1', '2'), ('3', '4'), ('5', '6'), ('7', '8'), ('9', '10'), ('11', '12')]
  </code></pre>
  
  <p>I am trying to get the result of 'a' to split into groups of 4 instead of groups of two, ie:</p>
  
  <pre><code>('1','2','3','4'),('5','6','7','8')....etc.
  </code></pre>