# assert exp, exp raise with express condition
def a():
print("I am inside function a")
return f'assert triggered : x is now {x}'
def b():
print("I am inside function b")
return False
try :
x = 10
y = 1
result =x/y
# assert b(), a()
assert x != 10, f'assert triggered : x is now {x}'
if x == 1:
raise
except AssertionError as msg:
print(msg)
except RuntimeError:
print("x == 1")
except ZeroDivisionError:
print("wrong data and error triggered")
except TypeError as msg:
print(msg)
else:
print("data are fine !")
print(result)
finally :
print("file closing....")