title: Python which itertools module function should I use?
body: <p>Which itertools function (or any function) should I use if I want to achieve this:</p>
  <p>Input:</p>
  <pre><code>arr = [0, 1, 2]
  </code></pre>
  <p>Output:</p>
  <pre><code>[
  [0, 0, 0]
  [0, 0, 1]
  [0, 0, 2]
  [0, 1, 1]
  [0, 1, 2]
  [0, 2, 2]
  [1, 1, 1]
  [1, 1, 2]
  [1, 2, 2]
  [2, 2, 2]
  ]
  </code></pre>
  <p>Conditions:</p>
  <ul>
  <li>Length of <code>r</code>/<code>3</code></li>
  <li>No combinations of e.g. <code>1,0,0</code> and <code>0,1,0</code></li>
  <li>Yes repeating values e.g. <code>1,1,1</code> or <code>0,1,1</code></li>
  </ul>