How do I get an attribute from an object if I have the attribute name in a string?
<pre><code> class a :
     b = 10
</code></pre>

<p>I have a class 'a' with attribute 'b'.</p>

<pre><code>  o = a()
</code></pre>

<p>I create a object 'o' of class 'a'</p>

<pre><code>  v = 'b'
</code></pre>

<p>I have another variable 'v' having the string representation of attribute 'b' of class 'a'</p>

<p>Now suppose I have only 'v' and '0'.
ie how can I do </p>

<pre><code>o.v
</code></pre>

<p>How do I get the value of b ie '10'</p>
