strip
anstrip is a minimal library to strip ANSI sequences from strings.
Module to strip ANSI Escape codes from a string.
Python tool to safely remove comments and docstrings from source files using libcst.