What is the correct way to have attributes in an abstract class
from abc import ABC, abstractmethod
class Vehicle(ABC):
def __init__(self,color,regNum):
self.color = color
self.regNum = regNum
class Car(Vehicle):
def __init__(self,color,regNum):
self.color = color
self.regNum = regNum
car = Car("Red","ex8989")
print(car.color)
I went thro several codes but none of them felt as elegant as what we have in Java