exception in oython code example
Example 1: exception pyton print
except Exception as e: print(e)
Example 2: try except python
def sum_of(x, y):
try:
print(x + y)
except TypeError:
print("Invalid argument specified.")
except Exception as e: print(e)
def sum_of(x, y):
try:
print(x + y)
except TypeError:
print("Invalid argument specified.")