I have a parent class with a function. There is a subclass of the parent class that has the same function name, but instead of overriding it as usual, I would like to call the parent's function as well.
Here is an example:
class Person:
def __init__(self,p):
self.p = p
def printp(self):
print(self.p)
class Bob(Person):
def printp(self):
print('letter')
b = Bob('p')
b.printp()
Currently, this prints 'p'. I would like it to print:
p
letter