check key is present in python dictionary : <p>Below is the "data" dict</p>

<pre><code>{' node2': {'Status': ' online', 'TU': ' 900', 'Link': ' up', 'Port': ' a0a-180', 'MTU': ' 9000'}, ' node1': {'Status': ' online', 'TU': ' 900', 'Link': ' up', 'Port': ' a0a-180', 'MTU': ' 9000'}}
</code></pre>

<p>I am trying key node2 is present or not in data dict in  below code but it is not working. Please help</p>

<pre><code>if 'node2' in data:
    print "node2 Present"
else:
    print "node2Not present"
</code></pre>
