python try except print error code code example
Example 1: try pass python
except:
pass
Example 2: try except python
def sum_of(x, y):
try:
print(x + y)
except TypeError:
print("Invalid argument specified.")
except:
pass
def sum_of(x, y):
try:
print(x + y)
except TypeError:
print("Invalid argument specified.")