variable_name.upper()
is calling a method of the variable_name
class or an inherited class.
len(variable_name)
is calling Python's built-in len
function on a variable_name
object for which the len
function determines the length depending on the type of object, be it a str
or list
for example.
So the placement of the variable_name
tells you if you are calling a class attribute (variable_name
in front) OR you are passing a variable into a method which is not an attribute of the variable_name
class (variable_name
in the brackets).