calling methods in python
<p>I'm new to python.I read that every identifier is an object reference in python (including primitive data types). We use object reference to call object methods. For example</p>

<pre><code>a="hello world"
</code></pre>

<p>Here <code>a</code> is a reference to string object and i use this reference to call string object methods.But what I found today is that I can directly use the object itself instead of a reference. i.e both
<code>a.upper()</code> and <code>"hello world".upper()</code> are valid.What i need to know the underlying logic of calling an object method in python.How am I able to use both object reference and object itself to call methods. Is there a difference in above two methods??</p>
