title: printing numbers in python in order
body: <p>I need to print all the lists of numbers in python.</p>
  <p>so far I wrote this:</p>
  <pre class="lang-py prettyprint-override"><code>def lists(listNum, i):    
      if i == len(listNum) - 1:
         print listNum    
      else:    
          for j in range(index, len(listNum)):
              listNum[i], listNum[j] = listNum[j], listNum[i]    
              lists(listNum, i + 1)    
              listNum[i], listNum[j] = listNum[j], listNum[i]     
  lists([1, 2, 3], 0)
  </code></pre>
  <p>how can I print every list only once?
  If the list is 1,1,2 so it will print some of them twice.
  how can I prevent this ?</p>