How to make a nice matrix from a dictionary
<p>I am supposed to make a matrix that makes a list of nested dictionaries look nicely.
But I can't find out how to make a matrix, end even less how to put my values into it.</p>

<p>My dictionary looks like: </p>

<pre><code>    {'1': {'3': 0, '2': 1, '5': 1, '4': 0, '6': 29},
    '3': {'1': 0, '2': 0, '5': 0, '4': 1, '6': 1},
    '2': {'1': 13, '3': 1, '5': 21, '4': 0, '6': 0},
    '5': {'1': 39, '3': 0, '2': 1, '4': 0, '6': 14},
    '4': {'1': 1, '3': 1, '2': 17, '5': 2, '6': 0},
    '6': {'1': 0, '3': 43, '2': 0, '5': 0, '4': 1}}
</code></pre>

<p>and it should be ordered in a matix so it looks like this:</p>

<pre><code>        1  2  3  4   5   6
     1  -  1  0  0   1   29
     2  13 -  1  0   21  0
     3  0  0  -  1   0   1
     4  1  17 1  -   2   0
     5  39 1  0  0   -   14
     6  0  0  43 1   0   -
</code></pre>

<p>Can someone get me started?</p>

<h3>Edit:</h3>

<p>I have only tried to understand how to make a matrix.
And this is what i tried:</p>

<pre><code>    table=[[for 0 in range(6)] for j in range[6]]
    print table
    for d1 in range(6):
        for d2 in range(6):
            table[d1][d2]=d1+d2+2
    print table
</code></pre>

<p>But i have a dictionary, not lists.
I am really lost.</p>
