Python में child class parent class की properties कैसे access करती है?
How does a child class access the properties of a parent class in Python?
A
Composition / कम्पोज़ीशन
B
Inheritance / इनहेरिटेंस
C
Encapsulation / एनकैप्सुलेशन
D
Polymorphism / पॉलिमॉर्फ़िज़्म
Explanation
Python में जब कोई child class (उपवर्ग) किसी parent class (मूल वर्ग) की properties और methods को access करता है, तो इसे inheritance कहते हैं।
🔹 यह Object-Oriented Programming (OOP) की एक मुख्य विशेषता है।
🧪 उदाहरण (Example):
In English:
Inheritance allows a child class to access and reuse the attributes and methods of a parent class in Python.
Correct Answer: B) Inheritance / इनहेरिटेंस