Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python Inheritance

class Student(Person):
  def __init__(self, fname, lname, year):
    super().__init__(fname, lname)
    self.graduationyear = year
 

x = Student("Michael", "Smith", 2020)
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #Python #Inheritance
ADD COMMENT
Topic
Name
5+4 =