1class Parent:
2 def __init__(self, txt):
3 self.message = txt
4
5 def printmessage(self):
6 print(self.message)
7
8class Child(Parent):
9 def __init__(self, txt):
10 super().__init__(txt)
11
12x = Child("Hello, and welcome!")
13
14x.printmessage()