Can a Python class differentiate input types? -


for example in python class can have 2 different add methods can detect whether adding object integer, or object object, or object , string, etc?

yes, can use isinstance check if object of particular type.


Popular posts from this blog