python: extract raw value from multi-encapsulated dictionary
<p>I want to  extract  string "GROUP" from 2 level encapsulated dictionary.</p>

<pre><code>dict = {'instance1' : {'runType' : 'GROUP'},
        'instance2' : { 'runType' : 'PROCESS'}}
</code></pre>

<p>If i access runType of <code>instance1</code> with  obviuos way <code>dict['instance1']['runType']</code>, then i get the string <code>['GROUP']</code>. I also tried <code>dict['instance1'].get('runType', 'Null')</code>, with hope that <code>.get</code> will return raw string <code>"GROUP"</code>, but that did not happened.</p>

<p>Is there any other short way to get pure string data from <code>X&gt;1</code> level of dictionary without  <code>str()</code> and then <code>strip()</code> etc.?</p>

<p>--------------Solution---------------</p>

<p>dict['instance1']['runType'][0] will return pure GROUP string</p>
