lets break it down, built-in method, what could this mean? some programmer built some method which allows us to convert to uppercase, and he named the method
upper, that is nice, that makes it easier to remember and the method name describes what the method is going to do. isn’t that convenient?
of str obj, so apparently this method belongs to string object. You know (hopefully) what strings are? and it seems, string is an object, whatever that means. We will leave that for now
so is it an error? No, its not. It might look complicated, but its not really.
so, it seems we can do more with methods and functions the calling them.
in fact, lets take a function, its a bit easier, lets say we have
len(), we could do:
my_len = len
print my_len("hello world")
what do you think happens?
Exactly, we store the function len in a variable, this variable is now a function, which we can use to determine the length!
congratulations, you just wrote your first function. In a bit, you will learn that besides built-in function, you can also write your own custom functions