python coordinates generator
<p>I need to generate all points coordinates by given dimensions, for example:</p>

<pre><code>&gt;&gt;&gt;points(2,2)
&gt;&gt;&gt;[(0,0),(0,1),(1,0),(1,1)]
&gt;&gt;&gt;points(1,1,1)
&gt;&gt;&gt;[(0,0,0),(0,0,1),(0,1,0),(0,1,1),(1,1,0),(1,1,1)]
</code></pre>

<p>I,ve seen <a href="http://stackoverflow.com/questions/9082829/creating-2d-coordinates-map-in-python">solution</a> for 2-dimensions, but cant find a way to make method independent of number of dimensions:</p>

<pre><code>&gt;&gt;&gt; from itertools import product
&gt;&gt;&gt; list(product(xrange(d) for d in (1,2,3)))
[(xrange(1),), (xrange(2),), (xrange(3),)] #where is my tuples?
</code></pre>

<p>where (1,2,3) are *args tuple, which can be anything.</p>
