Python Overloading
Python Overloading
Eg 1: + operator can be used for Arithmetic addition and String
concatenation
print(10+20)#30
print('durga'+'soft')#durgasoft
Eg 2: * operator can be used for multiplication and string repetition
purposes.
print(10*20)#200
print('durga'*3)#durgadurgadurga
Eg 3: We can use deposit() method to deposit cash or cheque or dd
deposit(cash)
deposit(cheque)