Python - Advanced Exception Handling
What will be the output of this code?
def f():
try:
1 / 0
except ZeroDivisionError as e:
raise ValueError("Invalid value") from e
try:
f()
except Exception as ex:
print(type(ex).__name__)
print(ex.__cause__)