Hey, long time no see, it's it's been a while, but I'm glad you're back and I'm I'm glad you're still
hanging in there, trust me.
Thinks things are going to get a lot more fun once we actually start building applications.
But we do have to go through the basics.
So hang in there.
Now, you may have heard me mention methods and functions before, and I briefly touched on the subject.
Right.
We have functions like list print.
We have things like Max, man, what else do we have?
We have input.
These are all built in functions in Python.
Python just comes with this and we're able to use them.
And we also learned about functions that we can create ourselves custom functions like, well, some
random.
Stuff and I just created a function that does absolutely nothing I can just pass through.
And these are all functions, because the way we call them is, well, we say some random stuff and
then we call it with the brackets and give it some sort of data or leave it empty.
But we also learned about methods and methods were different because the way we used them was using
the dot notation, we said dot something.
For example, if we had a string.
Hello?
And I do Dot, I get a list of all these methods that the string data type can use, these aren't things
that we can use like this, because if I do capitalize.
Like this, well, it's going to give me an air, it's going to say.
Well, I'm going to get in there with Max because it's expecting an argument here, but let's comment
this out and click run again.
I get name capitals is not defined because it's not a function, it's a method, and then method has
to be owned by something.
And who owns a method?
Well, whatever is to the left of the DOT, in our case, the string.
Owns the method capitalized.
And that's what methods are there, builtin objects that have methods such as string's dictionaries,
sets, tuples, all the things we've talked about, where as soon as we do DOT, we have access to all
these methods.
They're owned by an object or a data type.
And the funny thing is that there's ways to build your own methods.
And I'll show you how to do that later on.
And when we start talking about classes, but you can see here the our editors help us determine what
type of methods that we can use.
And again, these are built into Python.
And you can also learn about these methods that we can use by going to the Python documentation.
Right.
Python three documentation is going to have a ton of things for us.
If we go to library reference, for example, we can see here that we can learn about built in types.
So let's go to let's go to the set types.
And here you can see that we have set type and it shows us how we can use it.
Now, Python doesn't have the easiest documentation to read for beginners, unfortunately.
So sometimes it's better to actually just Google instead of going through the actual documentation.
But you see here that the set type has clear has pop has removed.
If we want to use it, we have update and these are the methods that we can use.
But at the end of the day, both methods and functions allow us to take actions, right, to take actions
on our data types, to have our programs do something.
And although they have these different names and one has a dot in front of it and another one, while
we can just call it like this.
The difference is very minimal.
But keep that in mind.
When you hear people talking about methods and functions, there is that difference.
And like I said before, we will get to methods when we talk about classes to show you how we can create
our own.
I'll see in the next one.