Python, Python Programming, Programming, Coding, Artificial Intelligence.
We start with a simple function to add two numbers: def add(x, y): return x + y print(add(1,"a")) We expect to get an error here as we cannot add 1 and “a” which have different data types. Here is the error: TypeError: unsupported operand type(s) for +: 'int' and 'str' We can decorate this function