how to instantiate abstract class python code example

Example 1: abstract method python

from abc import ABC, abstractmethod
 
class AbstractClassExample(ABC):
 
	def __init__(self, value):
        self.value = value
        super().__init__()
    
    @abstractmethod
    def do_something(self):
        pass

Example 2: python instantiate class

# To instantiate a class, you need to have a __init__ function inside the class
# Example:
class Human(object):
  
    def __init__(self, name, age): # Here is that function I was talking about
        # It sets some variables so I can use them in other functions in this class.
        self.name = name
        self.age = age
    
    def say_name(self):
        print(f"My name is {self.name}.")
    
    def say_age(self):
        print(f"My age is {self.age}.")

bob = Human("Bob", 28)
bob.say_name()
bob.say_age()