Updating Dictionaries in Python
<p>I'm reading per line a file and creating new entries for my dictionary:</p>

<p>Suppose that the first line after parsing and splitting will have an entry like this:</p>

<pre><code>dict = {"A":{"B":1}, "G":{"P":2}}....
</code></pre>

<p>then I continue to line 2 and say there is an arbitrary lines to read:</p>

<p>And both keys "A", and "G" appeared again along with them are another entries of values:</p>

<p>Suppose the Second line contained:</p>

<pre><code>dict = {"A":{"H":10}, "G":{"L":5}}....
</code></pre>

<p>Now my question is that, whenever my program reads from a file instead of resetting the information stored for an existing key, like "A", "G". I would like to do have this instead:</p>

<pre><code>dict = {"A":{"B":1,"H":10}, "G":{"P":2,"L":5}}
</code></pre>

<p>then it should keep on updating whenever it says an existing key in the dictionary or make a new entry otherwise</p>
