ELI5: Explain Like I'm 5

Duck typing

Duck typing is a way of writing code that makes it flexible and easy to use. It means that when you write code, you don't have to worry about the exact type of an object (like a number or a string) but instead you just look at what that object can do. For example, if you want to move a box, it doesn't matter if it's made of wood, metal, or plastic. All that matters is that it can be moved. So when we do "duck typing," we are more concerned with what an object can do, rather than what type of object it is.
Related topics others have asked about: