Hiding complex implementation details and showing only the essential features of an object. In Python, abstraction is achieved through encapsulation and providing interfaces.
from abc import ABC, abstractmethod
class Animal(ABC): # Abstract class @abstractmethod def make_sound(self): pass
class Dog(Animal): def make_sound(self): return "Bark!"
class Cat(Animal): def make_sound(self): return "Meow!"
dog = Dog()cat = Cat()
print(dog.make_sound()) # Output: Bark!print(cat.make_sound()) # Output: Meow!