class t2():
def __init__(self, name, surname ):
self.a = name
self.b = surname
return
def concatenate( what ):
what.a = what.a + " " + what.b
return
class t3( t2 ):
def concatenate( self ):
return self.a
xx = t3( "Lebron", "James" )
xx.concatenate()
print( xx.concatenate(), xx.a )
Bit confuse as to why this code gives the output of "Lebron Lebron" how does it know which function to use from which class? Thanks!