I want to know that what will happen if we have multiple __init__ methods in the same class? Is the latest __init__ method going to override the earlier __init__ methods? If yes, kindly explain in easy words, what is overriding?
class D:
def __init__(self, x):
print(f'Constructor 1 with argument {x}')
# is this will overide the above __init__ method?
def __init__(self, x, y):
print(f'Constructor 1 with arguments {x}, {y}')
# is this will overide the above __init__ method?
def __init__(self):
pass