title: How to create N-tuples in Python?
body: <p>What would be the easiest way to create a list of n-tuples in Python?</p>
  
  <p>For example, if I want to create for a number n (for e.g. 3): </p>
  
  <p>I'd want to generate the following set of tuples: </p>
  
  <pre><code>(1,1,1) (1,1,2) (1,1,3) (2,1,1) (2,1,2) (2,1,3) (3,1,1) (3,1,2) (3,1,3)  
  (1,2,1) (1,2,2) (1,2,3) (2,2,1) (2,2,2) (2,2,3) (3,2,1) (3,2,2) (3,2,3)  
  (1,3,1) (1,3,2) (1,3,3) (2,3,1) (2,3,2) (2,3,3) (3,3,1) (3,3,2) (3,3,3) 
  </code></pre>