try: x = input('enter the first number:') y= input('enter the second number:') print(int(x)/int(y)) except (ZeroDivisionError, TypeError, NameError) as e: print(e) finally: print("clean up")
result:
enter the first number:5 enter the second number:1 5.0 clean up