Python - Advanced Exception Handling
Given this code, what will be printed?
def func():
try:
{}['key']
except KeyError as e:
try:
1 / 0
except ZeroDivisionError as ze:
raise RuntimeError('Runtime problem') from ze
try:
func()
except Exception as ex:
print(ex)
print(ex.__cause__)