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
a="hello world"
Here a 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
a.upper() and "hello world".upper() 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??