Ticker

6/recent/ticker-posts

Data Abstraction in Python:

 Data Abstraction in Python:

Data Abstraction is a process of hiding all important or irrelevant datas. This is used to reduce the complexity and to increase the efficiency.

For example the user manual of any electronic gadget does not have the details of internal functions or processes.

Syntax for abstract class:

from abc import ABC

class Abstract_class_name(ABC)

@abstractmethod

#body of class 

pass

Creating abstract method and class:

 

Example for data abstraction in Python

Here the DomesticWild method is abstracted and it cannot be accessed.

Post a Comment

0 Comments