Bird
0
0

Which module must be imported to use abstract base classes in Python?

easy📝 Conceptual Q2 of 15
Python - Polymorphism and Dynamic Behavior
Which module must be imported to use abstract base classes in Python?
Aabc
Babstract
Cbase
Dinterface
Step-by-Step Solution
Solution:
  1. Step 1: Recall the standard library module for ABCs

    Python provides abstract base class support in the 'abc' module.
  2. Step 2: Verify module names

    There is no standard 'abstract', 'base', or 'interface' module for ABCs.
  3. Final Answer:

    abc -> Option A
  4. Quick Check:

    ABC module = abc [OK]
Quick Trick: Use 'abc' module for abstract base classes [OK]
Common Mistakes:
  • Trying to import non-existent modules like 'abstract'
  • Confusing module names with other languages
  • Forgetting to import the module before using ABC

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Python Quizzes