if we input
10/0
it will output: (Question here --- desired output while using Try Except)
Traceback (most recent call last):
File "D:\Python_Projects\00_Live\env\lib\site-packages\IPython\core\interactiveshell.py", line 3427, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-2-e574edb36883>", line 1, in <module>
10/0
ZeroDivisionError: division by zero
but if we use
try:
10/0
except Exception as e:
print(e)
it only output:
division by zero
How do we get python to output the whole errors like in the first case while using Try Except?