python 3 exception get line code example
Example: exception get line number python
import traceback
try:
print(4/0)
except ZeroDivisionError:
print(traceback.format_exc())
import traceback
try:
print(4/0)
except ZeroDivisionError:
print(traceback.format_exc())