OOPs was so confusing for me earlier! Finally undestoood classes in python so easily, now i finally get what that self, and constructor and how to use them. Thank you so much sir!
Learning Python Day 12 - present sir 00:03 Object Oriented Programming is like making Gujiya 01:58 Understanding object-oriented programming through generalized forms and classes. 05:45 Follow naming conventions and indentation in Python classes. 07:41 Understanding object creation and attributes in Python 11:41 Understanding object-oriented programming in Python. 13:36 Understanding the usage of variables and parameters inside a class in Python 17:44 Method to display full name of car brand and model 19:49 Object-oriented programming concepts in Python 24:06 Creating object and setting up wireless connection 25:55 Using inheritance and 'super' keyword to access parent class methods and attributes in Python 29:34 Encapsulation is about controlling access to class attributes 31:32 Creating methods for accessing and setting attributes in Python 35:31 Encapsulation and its importance 37:36 Polymorphism allows different behaviors for objects of the same class. 41:16 Class variables keep track of shared data, like counting instances. 43:32 Object creation and access in OOP Python 47:44 Static method in Java is a method belonging to the class, not owned by an instance. 49:52 Linking and Wiring in Object Oriented Programming 53:32 Decorators in Python allow you to modify functions. 55:19 Understanding data encapsulation and access control in object-oriented programming 58:51 Understanding the usage of decorators in Python 1:00:42 Understanding property decorators in Python. 1:04:49 Inheritance in electric car programming 1:06:54 Python supports classes, inheritance, and methods
58:15 when you did 'my_car.model = "City" ' in line 41 in that instance new property/attribute 'model' was created so now there are two attributes one '__model' and another 'model' for object 'my_car'. This happens because we can create new property for any object on the go and is not necessary to be in the class.
Finally undestoood classes in python so easily, now i finally get what that self, and constructor and how to use them, earlier it was so confusing. Thank you!
You should dub this same video in English, French, Italian etc as this is simply 203 months of study crammed in one video and explained by a simple Car class. Brilliant.
Practice time 05:01 Basic class and objects 17:38 Class Method and Self 21:46 Inheritence 28:47 Encapsulation 37:31 Polymorphism 41:17 Class Variables 47:03 Static Method 54:36 Property Decorators 1:01:20 Class Inheritence and instance Function 1:03:24 Multiple inheritence
52:25 jab staticmethod use kar k method bnaye the to obj se acess ho jatata sir Ex- print(my_car.general_description()) print(Car.general_description()) output :- Cars are means of transport Cars are means of transport
Pass is special keyword used as a placeholder for a code. In python when we make a class and we want to specify the use case later we just use pass to avoid error and code still being empty
if someone ask me how to learn python, this is one of the best playlist ever (especially this video on OOPs). Itna accha video OOPs jaise concept pe koi kaise bna sakta hai 🤷♂👌
Finally undestoood classes in python so easily, now i finally get what that self, and constructor and how to use them, earlier it was so confusing. Thank you!
In Python, static methods are indeed meant to be accessed by the class itself rather than by instances of the class. However, there is a subtle difference in how static methods are defined and accessed in Python compared to other programming languages like Java or C++. In Python, static methods are declared using the `@staticmethod` decorator, which specifies that the method should be treated as a static method. However, static methods in Python are not truly bound to the class itself. Instead, they are bound to the class's namespace, which is the same namespace that contains the class's other attributes and methods. This means that while static methods can be accessed using the class name, they can also be accessed using an instance of the class, as shown in the example you provided. When you call a static method using an instance of the class, the instance itself is not used in any way. The method is simply called using the class's namespace. This behavior is different from static methods in other programming languages, where static methods are truly bound to the class and cannot be accessed using an instance of the class. In Python, the ability to access static methods using both the class name and an instance of the class provides greater flexibility and allows for more concise code in certain situations. It's important to note that while static methods can be accessed using both the class name and an instance of the class, they should generally be accessed using the class name for consistency and clarity. class MyClass: @staticmethod def my_static_method(): print("Hello from static method!") # Calling using the class name MyClass.my_static_method() # Output: Hello from static method! # Calling using an object obj = MyClass() obj.my_static_method() # Output: Hello from static method!
Awesomely done. Hands the best teacher I have ever seen. cleared all the basics practically you are truly a gem sir for the Indian coding community. Thanks
The pass statement is used as a placeholder for future code. When the pass statement is executed, nothing happens, but you avoid getting an error when empty code is not allowed. Empty code is not allowed in loops, function definitions, class definitions, or in if statements.
This single video is more valuable then some RUclipsr's entire channels. Incredible work sir. I learnt so many things. Oops inheritance, polymorphism, constructor, decorator thank you so much sir
i thought that this would be that boring video by learning the OOP with fancy names, but loved it how you explain it by just solving problems and learning along with it.
28:37 / 1:08:28 Encapsulation __brand ->private (only class members can use not outsider object) {hence data is encapsulated } 36:45 / 1:08:28 Class Variable
i noticed a good point in static method that we can execute static function using object but we have to remove " self " as a parameter from static function that means we are not sending a reference of our object ( self contains reference of object ) that we are accessing the static by class only
Grear Sir, I have studied about OOP and thought had very strong grip on its concept, but every time when I listen to Hitesh Sir It takes me to next step.
learning Python Day 12 - present sir 00:03 Object Oriented Programming is like making Gujiya 01:58 Understanding object-oriented programming through generalized forms and classes. 05:45 Follow naming conventions and indentation in Python classes. 07:41 Understanding object creation and attributes in Python 11:41 Understanding object-oriented programming in Python. 13:36 Understanding the usage of variables and parameters inside a class in Python 17:44 Method to display full name of car brand and model 19:49 Object-oriented programming concepts in Python 24:06 Creating object and setting up wireless connection 25:55 Using inheritance and 'super' keyword to access parent class methods and attributes in Python 29:34 Encapsulation is about controlling access to class attributes 31:32 Creating methods for accessing and setting attributes in Python 35:31 Encapsulation and its importance 37:36 Polymorphism allows different behaviors for objects of the same class. 41:16 Class variables keep track of shared data, like counting instances. 43:32 Object creation and access in OOP Python 47:44 Static method in Java is a method belonging to the class, not owned by an instance. 49:52 Linking and Wiring in Object Oriented Programming 53:32 Decorators in Python allow you to modify functions. 55:19 Understanding data encapsulation and access control in object-oriented programming 58:51 Understanding the usage of decorators in Python 1:00:42 Understanding property decorators in Python. 1:04:49 Inheritance in electric car programming 1:06:54 Python supports classes, inheritance, and methods
When you are removing the self from general description at 50 min that time you by mistake your removed self of fuel type in ElectricCar class not major issue just giving a good feedback. Love you sir you are great !!!
Thank you for teaching such a complex concept in very simple and easy terms. With this video i have gained confidence in Python objects and inheritance. Thankyou
Sir mai python oops ki wajah se interview crack nhi saka Lekin aapke video dekhne ke baad mujhe oops ke all concept clear ho Gaye Thanks for sharing this useful knowledge
I have completed the full video at once i loved the way hitesh sir teach , he teached all the concepts so smoothly and in very easy way , Big Thanks for this series sir 🙏✨️
Sir You have made things so easy and made me learn to write project code with industry standard while being in college, I have also seen your backend playlist and it has helped me a lot thx a lot
Sir, your approach to coding is as simple and refreshing as making a cup of tea. Just like brewing the perfect chai, you blend simplicity with richness, making the learning process both delightful and flavorful. Keep serving those amazing tutorials, they're a treat to our minds!
I already knew objected oriented programming concepts in C++ and Java, it is amazing to see how different languages always come with something new to offer, this pointer in C++, super() method in java, @property decorator in python.
sir, there is a conceptual mistake at 51:47 . You said that the objects can not access static methods, but static method works on classed as well as instances of that class . Investigation study karke pata kiya :) thanks for these lectures (i find this playlist as the fastest way to learn and gain confidence in python) For the viewers: The difference between a normal method and static method is that inside a static method, you can't use any of the properties or method associated with the class. All the implementation has to be done using the parameters of that static method. BTW there is also a classmethod decorator, explore it also
I usually like the video before watching the whole thing because I know Hitesh Sir will never leave me doubtful. 🥰 Hmare bihar me Pirukiya bolte h gujhya ko
At 58:25, when we write my_car.name = "city", it actually creates a new attribute name in the my_car instance. This happens because self.name doesn’t already exist as a public attribute in the class. In this case, we made name private by using self.__name, so my_car.name doesn’t overwrite self.__name. Instead, it creates a separate name attribute in my_car. To modify the private __name attribute, we can access it using my_car._My_car__name. Now, name and __name are separate attributes.
agar mein is video full dekhne ki baad oop sikh jate hein to meri jitni bhi gmail account hein o sab se aap ki account ko subscribes karenge. because I am learning coding from 2016 se. abhi bhi oop mein bohot sari problems ate rehte hein. video dekhna start kari rahi hu.hope for the best
Sir jab bhi aap chai or code ek sath bolte ho mujhe chai or Sutta dhyan aa jata hai 😂Channel ka name Chai or Code ki jagah Chai or Sutta rakhdo ❤❤❤Aap bht ache se samjhate ho sir. #ChaiOrCode ☕🧑💻 #ChaiOrsutta ☕🚬
4 months but still no 800 comments He is god level teacher .. help his channel grow 4 months but still no 800 comments He is god level teacher .. help his channel grow
Whoever is watching this video, just remember, the static method part is wrong. The class instance can 100% access the static method. Both class and instance can access the static methods. Static method means it does not get created for each instance, rather it gets created for only once.
I have a question related to scope after going through class and object a = 100 def add(x,y) print(x+y) class MyClass:
def mymethod(self): print(a) add(1,6) Can I access the global variable a and function add inside a instance method(or any where in class body) . If yes can you please explain this.
So, when you define a class, the interpreter tries to find the variable within the class, at first in the function and then within the class; That's why it was not able to print a; You can do in this way: a = 100 def add(x, y): print(x + y) class MyClass:
def mymethod(self): global a # Access the global variable 'a' print(a) add(1, 6) show = MyClass() show.mymethod()
great video! This difficult concept was explained so easily. Just one feedback. In the end of yoru such videos, give some basic real life exercises as a takeaway for us to practice mixed concepts
OOPs was so confusing for me earlier! Finally undestoood classes in python so easily, now i finally get what that self, and constructor and how to use them. Thank you so much sir!
Learning Python Day 12 - present sir
00:03 Object Oriented Programming is like making Gujiya
01:58 Understanding object-oriented programming through generalized forms and classes.
05:45 Follow naming conventions and indentation in Python classes.
07:41 Understanding object creation and attributes in Python
11:41 Understanding object-oriented programming in Python.
13:36 Understanding the usage of variables and parameters inside a class in Python
17:44 Method to display full name of car brand and model
19:49 Object-oriented programming concepts in Python
24:06 Creating object and setting up wireless connection
25:55 Using inheritance and 'super' keyword to access parent class methods and attributes in Python
29:34 Encapsulation is about controlling access to class attributes
31:32 Creating methods for accessing and setting attributes in Python
35:31 Encapsulation and its importance
37:36 Polymorphism allows different behaviors for objects of the same class.
41:16 Class variables keep track of shared data, like counting instances.
43:32 Object creation and access in OOP Python
47:44 Static method in Java is a method belonging to the class, not owned by an instance.
49:52 Linking and Wiring in Object Oriented Programming
53:32 Decorators in Python allow you to modify functions.
55:19 Understanding data encapsulation and access control in object-oriented programming
58:51 Understanding the usage of decorators in Python
1:00:42 Understanding property decorators in Python.
1:04:49 Inheritance in electric car programming
1:06:54 Python supports classes, inheritance, and methods
thanks bro
I don’t know why this man is sharing this type of content free in youtube…. 😊…. Sooo much love…. So much valuable information ❤
Bharat is already famous for rishi-muni gurus and hitesh sir wants best software engineers will also be from India in the whole world.
@@sidhantarya2483
Ultimate Answer. 🙏..
Dil se parhate hen, Dil se samjhate hen aur samjh me b ata he ❤. Perfect for beginners. A GEM for revision purpose of OOP.
58:15
when you did 'my_car.model = "City" ' in line 41 in that instance new property/attribute 'model' was created so now there are two attributes one '__model' and another 'model' for object 'my_car'. This happens because we can create new property for any object on the go and is not necessary to be in the class.
fine observation.
exactly dude....i was confused for 2 hrs and when i figured it out, i saw ur comment ;-;
thank y
class Car:
def __init__(self, brand, model):
self.brand = brand
self.__model = model
@property
def model(self):
return self.__model
mycar = Car("tata", "safari")
print(mycar.model)
# mycar.model = "city" #this line will give error
is this correct code ? ?
Finally undestoood classes in python so easily, now i finally get what that self, and constructor and how to use them, earlier it was so confusing. Thank you!
I am trying to learn oops in python since many days but unable because of you now I am confident in oops. Thank you sir
You should dub this same video in English, French, Italian etc as this is simply 203 months of study crammed in one video and explained by a simple Car class. Brilliant.
4 months but still no 800 comments 😭 He is god level teacher .. help his channel grow
😮💨
True
Relax 840 comment ho gaye
❤
@@godbhaigodper bhaut din lag gaya yrr😢
Practice time
05:01 Basic class and objects
17:38 Class Method and Self
21:46 Inheritence
28:47 Encapsulation
37:31 Polymorphism
41:17 Class Variables
47:03 Static Method
54:36 Property Decorators
1:01:20 Class Inheritence and instance Function
1:03:24 Multiple inheritence
52:25 jab staticmethod use kar k method bnaye the to obj se acess ho jatata sir
Ex-
print(my_car.general_description())
print(Car.general_description())
output :-
Cars are means of transport
Cars are means of transport
Correct Bro...
@staticmethod means it does not require an instance of the class to be called
if we need to hide then we do print(Car.__general_info())
been following your videos since 2018 and LCO courses since I was in high school now in my second year uni in Aus. appreciate your work
Pass is special keyword used as a placeholder for a code. In python when we make a class and we want to specify the use case later we just use pass to avoid error and code still being empty
if someone ask me how to learn python, this is one of the best playlist ever (especially this video on OOPs). Itna accha video OOPs jaise concept pe koi kaise bna sakta hai 🤷♂👌
Finally found such a detailed playlist, was looking back to remember the definitions when I stumbled over this
Finally undestoood classes in python so easily, now i finally get what that self, and constructor and how to use them, earlier it was so confusing. Thank you!
Amazing video on Python OOPs. Etna toh college may nai krvaya jitna apnay ek vidoe may krva diya sir!!!! 😄
Sir, you teach in such a way which make any complex topic very easy
💯💯💯💯
In Python, static methods are indeed meant to be accessed by the class itself rather than by instances of the class. However, there is a subtle difference in how static methods are defined and accessed in Python compared to other programming languages like Java or C++.
In Python, static methods are declared using the `@staticmethod` decorator, which specifies that the method should be treated as a static method. However, static methods in Python are not truly bound to the class itself. Instead, they are bound to the class's namespace, which is the same namespace that contains the class's other attributes and methods.
This means that while static methods can be accessed using the class name, they can also be accessed using an instance of the class, as shown in the example you provided. When you call a static method using an instance of the class, the instance itself is not used in any way. The method is simply called using the class's namespace.
This behavior is different from static methods in other programming languages, where static methods are truly bound to the class and cannot be accessed using an instance of the class. In Python, the ability to access static methods using both the class name and an instance of the class provides greater flexibility and allows for more concise code in certain situations.
It's important to note that while static methods can be accessed using both the class name and an instance of the class, they should generally be accessed using the class name for consistency and clarity.
class MyClass:
@staticmethod
def my_static_method():
print("Hello from static method!")
# Calling using the class name
MyClass.my_static_method() # Output: Hello from static method!
# Calling using an object
obj = MyClass()
obj.my_static_method() # Output: Hello from static method!
Just thinking what will be a production scenario where static method can be used by both Class and instance of the class as described above.
Scrolling through the comments to find someone discussing this… and here you are, brother.♥️
Awesomely done. Hands the best teacher I have ever seen. cleared all the basics practically you are truly a gem sir for the Indian coding community. Thanks
dialogue yaad agya😂"Maamla aagya h class ka aur tum maat khaa gye ho class se kuki ham h unchi class ke aur tum ho nichi class ke"
The pass statement is used as a placeholder for future code. When the pass statement is executed, nothing happens, but you avoid getting an error when empty code is not allowed. Empty code is not allowed in loops, function definitions, class definitions, or in if statements.
Krdya ❤❤❤
Never Understood OOP Concept this much easy. Thank you so much sir for providing this lecture on RUclips❤️
Excited for the django series sir
Yes
There is not a single latest course on whole youtube so big yes
@@zalaam_0 if also have , we would like to learn from hitesh sirji , because when we learn from sir , Just another level❤️❤️❤️
I can't express how well this is explained-it's clear and straightforward!
Who will stay for the end of the series
Me 🙋♂️
Me
Me also...
I
Me🙂
This single video is more valuable then some RUclipsr's entire channels. Incredible work sir. I learnt so many things. Oops inheritance, polymorphism, constructor, decorator thank you so much sir
I watched more than five courses, but I didn't understand. At last, I found this video and understood it Consept. Thank you so match ❤😊😊
i thought that this would be that boring video by learning the OOP with fancy names, but loved it how you explain it by just solving problems and learning along with it.
28:37 / 1:08:28 Encapsulation __brand ->private (only class members can use not outsider object) {hence data is encapsulated }
36:45 / 1:08:28 Class Variable
Isse acha content nai dekha mane related to learning python. Best playlist 😍
i noticed a good point in static method that we can execute static function using object but we have to remove " self " as a parameter from static function that means we are not sending a reference of our object ( self contains reference of object ) that we are accessing the static by class only
I never drop any comments but Really Sir 40 min in your video so far and I'm loving it... You are a GREAT TEACHER :)
I was stucked in OOp s in python for a day and then I find this vid and understand everything.Highly recommended for understanding oops in python.
Grear Sir, I have studied about OOP and thought had very strong grip on its concept, but every time when I listen to Hitesh Sir It takes me to next step.
learning Python Day 12 - present sir
00:03 Object Oriented Programming is like making Gujiya
01:58 Understanding object-oriented programming through generalized forms and classes.
05:45 Follow naming conventions and indentation in Python classes.
07:41 Understanding object creation and attributes in Python
11:41 Understanding object-oriented programming in Python.
13:36 Understanding the usage of variables and parameters inside a class in Python
17:44 Method to display full name of car brand and model
19:49 Object-oriented programming concepts in Python
24:06 Creating object and setting up wireless connection
25:55 Using inheritance and 'super' keyword to access parent class methods and attributes in Python
29:34 Encapsulation is about controlling access to class attributes
31:32 Creating methods for accessing and setting attributes in Python
35:31 Encapsulation and its importance
37:36 Polymorphism allows different behaviors for objects of the same class.
41:16 Class variables keep track of shared data, like counting instances.
43:32 Object creation and access in OOP Python
47:44 Static method in Java is a method belonging to the class, not owned by an instance.
49:52 Linking and Wiring in Object Oriented Programming
53:32 Decorators in Python allow you to modify functions.
55:19 Understanding data encapsulation and access control in object-oriented programming
58:51 Understanding the usage of decorators in Python
1:00:42 Understanding property decorators in Python.
1:04:49 Inheritance in electric car programming
1:06:54 Python supports classes, inheritance, and methods
Guru ji imandari se ab question solve kar raha hu mza aa raha hai ❤
Thank you sir aapne bahaut asani se samja diye haim Sare concepts... It's very helpful
One of the best videos on Object-Oriented Programming in python I have ever witnessed.
Chai with Python while learning to make gujia objects = awesome learning ! Thank you for explaining so well ...
sir you are studied very nice, fantastic .
Thank You!
For studied object oriented programming
When you are removing the self from general description at 50 min that time you by mistake your removed self of fuel type in ElectricCar class not major issue just giving a good feedback. Love you sir you are great !!!
My friend recommended me about this channel, and I love the way of teaching.
Thank you for teaching such a complex concept in very simple and easy terms. With this video i have gained confidence in Python objects and inheritance. Thankyou
Sir mai python oops ki wajah se interview crack nhi saka
Lekin aapke video dekhne ke baad mujhe oops ke all concept clear ho Gaye
Thanks for sharing this useful knowledge
I have completed the full video at once i loved the way hitesh sir teach , he teached all the concepts so smoothly and in very easy way , Big Thanks for this series sir 🙏✨️
Sir You have made things so easy and made me learn to write project code with industry standard while being in college, I have also seen your backend playlist and it has helped me a lot thx a lot
very nice video with full of learning I am in 4th year now I learnt how to play with oops with python - thank you so much sir :)))
You explained OOP in such an easy and phenomenal way! Thank you for making complex concepts so understandable. Love from Pakistan! 😍
Sir, your approach to coding is as simple and refreshing as making a cup of tea. Just like brewing the perfect chai, you blend simplicity with richness, making the learning process both delightful and flavorful. Keep serving those amazing tutorials, they're a treat to our minds!
Thank you sir , this is the first time I completely understand OOPS
oop se jaldi main bachpan me cycle sikh lia tha. now i am here. thanks for this video. i am going to watch it fully.
I already knew objected oriented programming concepts in C++ and Java, it is amazing to see how different languages always come with something new to offer, this pointer in C++, super() method in java, @property decorator in python.
sir, there is a conceptual mistake at 51:47 . You said that the objects can not access static methods, but static method works on classed as well as instances of that class . Investigation study karke pata kiya :)
thanks for these lectures (i find this playlist as the fastest way to learn and gain confidence in python)
For the viewers: The difference between a normal method and static method is that inside a static method, you can't use any of the properties or method associated with the class. All the implementation has to be done using the parameters of that static method. BTW there is also a classmethod decorator, explore it also
thank you so much bhaiya mujhe lag raha tha ki mere code me error h :)
1:08:13
ek channel aaya h "chai aur code" ☕❤, jo dil se pdhate h aur dil se smjate h❤❤❤❤❤❤❤❤
Underrated channel as a gem💎
Setter ka kaam hai private data ko safely change karna. Direct access nahi hota, aur setter methods ke through hi changes kiye jaate hain.
36:32
One of the best videos on Python lecture and easily explains the difficult topics Thank you so much, sir 😇
Sir apka English Bahut accha hai free codecamp pe dekha hai
I usually like the video before watching the whole thing because I know Hitesh Sir will never leave me doubtful. 🥰
Hmare bihar me Pirukiya bolte h gujhya ko
At 58:25, when we write my_car.name = "city", it actually creates a new attribute name in the my_car instance. This happens because self.name doesn’t already exist as a public attribute in the class.
In this case, we made name private by using self.__name, so my_car.name doesn’t overwrite self.__name. Instead, it creates a separate name attribute in my_car.
To modify the private __name attribute, we can access it using my_car._My_car__name.
Now, name and __name are separate attributes.
agar mein is video full dekhne ki baad oop sikh jate hein to meri jitni bhi gmail account hein o sab se aap ki account ko subscribes karenge. because I am learning coding from 2016 se. abhi bhi oop mein bohot sari problems ate rehte hein. video dekhna start kari rahi hu.hope for the best
Sir jab bhi aap chai or code ek sath bolte ho mujhe chai or Sutta dhyan aa jata hai 😂Channel ka name Chai or Code ki jagah
Chai or Sutta rakhdo
❤❤❤Aap bht ache se samjhate ho sir.
#ChaiOrCode ☕🧑💻
#ChaiOrsutta ☕🚬
Complete oop concept thanks sir ♥️♥️
You have explained all the concepts very easily ... Good for the beginners like me😊
Content Quality is superb ❤️ from Dhaka,Bangladesh.
I've been watching series fr last 7 days this has been best course, ab mujhe OOPs relatable lagne lga h - 1 August 2024
First time am fully understand the concepts of OOP Thank you so much sir
Shuruwat majburi me kari thi Python, ab maja aara hain ❤
Super 🧑🔧 "Thoda difficult lg rha hai" 2,3 bar dekhne pr samjh a jaiga😊
Best OOPs video on RUclips!! 🔥
OOPs - Finally got some valuable knowledge.
🙏Thank you for clear explanation
❤❤❤❤❤❤علم دینے کا بہت شکریا😊
Nice way of teaching , and very interesting really I enjoy a lot. Thanks This was my first lecture, impressive
4 months but still no 800 comments He is god level teacher .. help his channel grow
4 months but still no 800 comments He is god level teacher .. help his channel grow
Very nice videos ❤❤❤
Method of teaching so perfect with real time examples, can in django series create a video on creating user wiith rights no one created on it yet.
Great content wth clear explanation sir jee😍😍
Thank you so much sir for oops concept explanation in a very easy manner 🙏
Thank you so much sir ❤❤❤❤
this is was perfect rather than those basic generic oops videos
this covered most of the things
10 questions are the best way to teach and learn. maza aa rha hai ish series m😊 great content @hitesh sir
Whoever is watching this video, just remember, the static method part is wrong. The class instance can 100% access the static method. Both class and instance can access the static methods. Static method means it does not get created for each instance, rather it gets created for only once.
Well thought Sir I understood each and every part of the tutorial, Thanks for such kind of tutorials...
I think this was the best explanation to OOP. Thank you sir🙌🏻
i started late but i want you to teach us more your channel make me belive that i also code if teacher is this level good.
I have a question related to scope after going through class and object
a = 100
def add(x,y)
print(x+y)
class MyClass:
def mymethod(self):
print(a)
add(1,6)
Can I access the global variable a and function add
inside a instance method(or any where in class body) . If yes can you please explain this.
So, when you define a class, the interpreter tries to find the variable within the class, at first in the function and then within the class; That's why it was not able to print a;
You can do in this way:
a = 100
def add(x, y):
print(x + y)
class MyClass:
def mymethod(self):
global a # Access the global variable 'a'
print(a)
add(1, 6)
show = MyClass()
show.mymethod()
The way you described is too good.. thank you
Sir, you teach in such a way which make any complex topic very easy
Awsome content Hitesh sir ji...........Thanks a ton ...keep up the great work....Respect from Bangalore.
one of the great teacher available on RUclips.
Perfect Teaching... Clear OOPs concept in python....
OMG your method of teaching is so chill and your Hindi is very refined. Sub'd
It's so higher level for me but I watching two times then I understood amazing Ha! Good work bro 1:07:56
Kitna asan hoti zindagi agar programming or real life problems ko itna bara karna ki jaga koi itna simple samjana wala hota😂
This series is very underrated....and explanations are God lvl🔥🔥
Appreciate that
And i see the comments to be at 857 now !! Awesome !! job and awesome teaching
Nice explanation . one of the best coding channel FS.
great video! This difficult concept was explained so easily. Just one feedback. In the end of yoru such videos, give some basic real life exercises as a takeaway for us to practice mixed concepts