Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Execute Python-3 Online

# Hello World program in Python

class MyClass():
    def __init__(self,name,age):
        self.name=name
        self.age=age
    def prin(self):
        print(self.name)

p1=MyClass("AARTI",32)
p1.prin()
print ("Hello World!");


class Student(MyClass):
    pass

p=Student("sakshi",27)
p.prin()

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.