title: Get all ordered combinations of list python
body: <p>I'm trying to generate all n-item combinations of a list of numbers while maintaining numerical order. So for example, if the list were</p>
  
  <pre><code>[1,2,3,4]
  </code></pre>
  
  <p>The ordered combinations of length 3 would be:</p>
  
  <pre><code>[1,2,3]
  [2,3,4]
  [1,2,4]
  [1,3,4]
  </code></pre>
  
  <p>To be clear, I have to maintain numerical order, so [1,4,2] would not be a desired outcome.</p>
  
  <p>Is there a function that does this, or a fast algorithm that would get it done? The actual list is 111 and I will be choosing 100 items. Thanks.</p>