Q. Which of the following defines inheritance in Python?

  • (A) class A inherits B:
  • (B) class A extends B:
  • (C) class A(B):
  • (D) class A implements B:
πŸ’¬ Discuss
βœ… Correct Answer: (C) class A(B):
Explanation: In Python, inheritance is defined using `class A(B):`, where A is the subclass and B is the superclass.
Explanation by: Mr. Dubey
In Python, inheritance is defined using `class A(B):`, where A is the subclass and B is the superclass.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
81
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
84%
Success Rate