<jupyter_start><jupyter_text>Traceback`traceback` provides an interface to print stack traces of Python programs. It exactly mimics the behaviour of the Python interpreter when it prints a stack trace.<jupyter_code>import traceback

try:
    5/0
except:
    traceback.print_exc()<jupyter_output>Traceback (most recent call last):
  File "<ipython-input-1-5b35d724d9df>", line 4, in <module>
    5/0
ZeroDivisionError: division by zero
{'fraction_non_alphanumeric': 0.07834101382488479, 'fraction_numerical': 0.029953917050691243, 'mean_word_length': 5.304347826086956, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '261103', 'license': 'MIT', 'n_tokens_mistral': 144, 'n_tokens_neox': 138, 'n_words': 46, 'path': 'Traceback.ipynb', 'repo_name': 'jimit105/pytricks', 'size': '434'}