Formatted input in Python
<p>I have a file that has the following:</p>

<pre><code>  A B C D
1 2 3 4 5
2   2 4
3 1   3 4
</code></pre>

<p>Note that 4 on line 2 is followed immediately by the new line.</p>

<p>I want to make a dictionary that looks like this</p>

<pre><code>['A']['1'] = 2, d['B']['1'] = 3, ..., d['D']['1'] = 5, d['B']['2'] = 2, etc
</code></pre>

<p>The blanks should not appear in the dictionary.</p>

<p>What's the best way to do this in python?</p>
