Please note, this is a STATIC archive of website www.w3schools.com from 05 May 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
Disabled
×
Change Orientation
class Person: def __init__(self, fname, lname): self.firstname = fname self.lastname = lname def printname(self): print(self.firstname, self.lastname) class Student(Person): def __init__(self, fname, lname, year): super().__init__(fname, lname) self.graduationyear = year x = Student("Mike", "Olsen", 2019) print(x.graduationyear)
2019
×
Report a Problem:
Your E-mail:
Page address:
Description:
Disabled