Accessing key names dynamically in a dictionary in python
<p><strong>Python{ 'Good' : '0', 'Bad' :'9', 'Lazy' : '7'}
I need to access the key names dynamically in a program. Eg.</strong></p>

<pre><code>a= raw_input (" which is the final attribute:")
for i in python.items():
    if python.items()[i] == a:
        finalAttribute = python.items()[i]
</code></pre>

<p><strong>This giving me error saying</strong> </p>

<pre><code>Traceback (most recent call last):
File "C:/Python27/test1.py", line 11, in &lt;module&gt;
if somedict.items()[i] == a:
TypeError: list indices must be integers, not tuple
</code></pre>
