‫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 Macs, 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 use 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 error.
‫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 named capitalize is not defined because it's not a function, it's a method and a 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.
‫Capitalize.
‫And that's what methods are.
‫They're built in objects that have methods such as strings, 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 fun 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 that 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.
‫Write 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, well,
‫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.