the order in which result of a set is printed in Python
<p>I'm new to Python. I've a question. Some one could help me.</p>

<p>I do the following in the command prompt:</p>

<pre><code>&gt;&gt;&gt; a=set()
&gt;&gt;&gt; for i in range(0,8):
...     a.add((i,j))
... 
</code></pre>

<p>the answer that I get when I print it is like this:</p>

<pre><code>&gt;&gt;&gt; a
set([(2, 7), (4, 7), (6, 7), (5, 7), (7, 7), (0, 7), (1, 7), (3, 7)])
</code></pre>

<p>I understand that its printing out the results in the way its stored. But is there a way I can get it ordered? Say for example in this way:</p>

<pre><code>(0,7), (1,7), (2,7), (3,7), ...
</code></pre>

<p>Thanks!</p>
