In Python, method overloading is not supported directly as in Java. Your task is to implement a function add that simulates method overloading by accepting either two integers or two strings, returning their sum or concatenation, respectively.
TypeError.Example 1:
Input: add(5, 10)
Output: 15
Example 2:
Input: add("Hello, ", "World!")
Output: "Hello, World!"
Example 3:
Input: add(5, "test")
Output: TypeError
add(5, 10)Output15WhyBoth inputs are integers, so they are summed.add('Hello, ', 'World!')Output'Hello, World!'WhyBoth inputs are strings, so they are concatenated.Arguments will be either integers or strings.No need to handle other data types.def add(a, b):