title: merge adjacent number in a list in python
body: <p>I have a list that contains a random number of ints.
  I would like to iterate over this list, and if a number and the successive number are within one numeric step of one another, I would like to concatenate them into a sublist.</p>
  
  <p>For example:</p>
  
  <pre><code>input = [1,2,4,6,7,8,10,11]
  output = [[1,2],[4],[6,7,8],[10,11]]
  </code></pre>
  
  <p>The input list will always contain positive ints sorted in increasing order.
  I tried some of the code from <a href="https://stackoverflow.com/questions/5850986/joining-elements-of-a-list-python">here</a>.</p>
  
  <pre><code>initerator = iter(inputList)
  outputList = [c + next(initerator, "") for c in initerator]
  </code></pre>
  
  <p>Although I can concat every two entries in the list, I cannot seem to add a suitable <code>if</code> in the list comprehension.</p>
  
  <p>Python version = 3.4</p>