Run
class Person: def __init__(self, name, age): self.name = name self.age = age class Student(Person): marks=0 def printDetails(self): print(f"Name: {self.name}\nAge: {self.age}\nMarks: {self.marks}") if issubclass(Student, Person): print(f"Student is a sub class of Person.") else: print(f"Student is not a sub class of Person.")
Output