Tried to create a comprehensive resource for learning OOP in Python.
Get started with OOP in Python by simply downloading and running these code examples.
Simply download and run these code examples on any Python IDE, including the official Python IDLE, which can be downloaded from (https://www.python.org/downloads/)
Key Topics Covered:
- Class Creation and Instantiation: Learn how to define classes and create objects from them.
- Attributes and Methods: Explore the concept of attributes (data) and methods (functions) within classes.
- Constructors: Understand how constructors are used to initialize objects.
- Inheritance: Discover how classes can inherit properties and behaviors from other classes.
- Polymorphism: Explore the concept of objects of different classes being treated as if they were of the same type.
Code Examples:
- Constructor_With_Super_Method.py
- Creating_A_Class_Having_Two_Methods.py
- Creating_A_Class_To_Check_The_Validity_Of_A_String_Of_Parentheses.py
- Creating_A_Class_With_2_Instances.py
- Creating_An_Instance_Of_A_Specified_Class.py
- Demonstrating_Constructor_in_Inheritance.py
- Demonstrating_Constructor_Overriding.py
- Demonstrating_Constructor_Overriding_With_Parameter.py
- Demonstrating_Constructor_With_Parameter_in_Inheritance.py (Note the typo - consider keeping it consistent)
- Demonstrating_Hierarchical_Inheritance_With_Constructor.py
- Demonstrating_Multiple_Level_Inheritance.py
- Demonstrating_Multiple_Inheritance_With_Super_Method.py
- Demonstrating_Multiple_Inheritance_Without_Super_Method.py
- Demonstrating_Single_Inheritance_With_Methods.py
As a fellow learner, I welcome suggestions,feedback and pull requests to improve this repository.