title: How to get all combinations of a list?
body: <p>I know that I can use <code>itertools.permutation</code> to get all permutations of size r.</p>
  <p>But, for <code>itertools.permutation([1,2,3,4],3)</code> it will return <code>(1,2,3)</code> as well as <code>(1,3,2)</code>.</p>
  <ol>
  <li><p>I want to filter those repetitions (i.e obtain combinations)</p>
  </li>
  <li><p>Is there a simple way to get all permutations (of all lengths)?</p>
  </li>
  <li><p>How can I convert <code>itertools.permutation()</code> result to a regular list?</p>
  </li>
  </ol>