 Hey, what's going on guys root from no shell.com here today, and we are looking at some more Python now today We're gonna be talking about the idea of object-oriented programming object-oriented programming is like a sort of tactic or a mindset or you could even go to length to call it a paradigm of The way of writing your code and your programs Usually it's kind of denoted as OOP or at least it's just an acronym for it So you might hear programmers and developers calling it like that But it's just the idea of using instances or like multiple objects in your programs Now you can think of an object like a big machine the big machine can store information It has these properties and these attributes that you can consider to be the variables in our case And they have actions and processes and things that they can do that we can consider to be the method The methods are the functions So now usually what you would be using object-oriented programming because you have the ability and access to create multiple instances and Instances is a single object because object is kind of the idea or the framework or the blueprint of what you're working with When you have multiple instances like let's say you wanted to have like five enemies If you were if you were programming a video game If if you were programming a video game you could have five enemies and all of these enemies are One sorts of enemies like if you're making maybe a side scroller You could just have an enemy that starts shooting in one single direction And since you don't have to do this like five times You could just build a framework or a blueprint for this idea and this mindset The this for an instance that will be able to shoot with a function in one direction So you can create five of those just by declaring as many as you need to maybe with a loop or maybe just Supplying them different attributes, maybe a different color, maybe a different size and that sort of thing So let's open up idle and let's see what we can do This might be a little hard to visualize because I'm not going to be showing you in this tutorial the way to make them ourselves unto the way to make objects and the way to create go about object-oriented programming ourselves Because there's a lot of new keywords that I have to introduce to you like class like self Constructor that sort of thing But we're going to go into those more in depth in the later tutorials obviously But for now let's take a look at what Python does and the way they store data as objects Because that's what they really do they do store data types as objects if we have a string We it's just a new variable and we can just have it be a string. So like this is a string now we have String we can return it and obviously we have this as a string now we get information from our objects with something that we Call a dot selector. It's just like another operator It's just like another symbol that you've seen before But it's it's simply a dot. It's just a period. So if we do string dot We're ready to do things and get things from our object So you can see if you wait a little bit you're gonna have your auto completion box just spring up And this is exactly what we want to if it doesn't we can just hit control space and there we go now We can look through an idle all the functions and all of the all the variables that we would be able to use if we Let's try something here. Let's look for counts. I think that's what I want to look with yeah We can use count and now you can see count is a built-in method count of string object And this is the memory address of that object So what we're gonna look at here is obviously count is going to be a method or a function so we're gonna have to call that and We can it's obviously just a method of that string object and in this case it's string We don't even have to be using this variable though. We can just use a completely different setup. Let's say string is This and obviously that's not set up as anything as a variable But we can still call these things with it because that data type is an object So let's try it. Let's try string dot count Now count is a function That will look for a substring or something that is inside that string and it'll display How many of those that it finds? So let's say is It should find two of them because it found this The is that's inside this and then the is that's immediately after it so there you go But that's just sort of a really simple idea because you're able to get Information you can run functions Inside your objects and that sort of thing But since this is a little bit more abstract because you're just looking at it without Visualizing it and making one of your own objects This is the way that I want to introduce it to you though because python stores their objects stores their data as objects We can do so much more. Let's try an int Let's just say integer Equals for so I wonder if we have any functions we can run with the integer. Yeah, we have all of these And let's see what they do integer real so the real form of the integer I'm thinking And Yeah, if you use the dot selector you can see what you can do with this object But that's all I've got for you in this tutorial. We have a lot more to cover There's definitely a lot to talk about in this sort of object-oriented programming world It's probably going to become a mini series just because there's so much out there and so much that I'm able to talk about with you guys, but just understand the idea of Attributes and properties that you can think of as variables and then the actions in the processes that you can think of as functions but hey, oh I hope to be seeing you guys in the next tutorial. It'd be cool if you could give me a like maybe a favorite Maybe subscribe. I don't know what you're doing, but I'll have a great day