With the method get_terminal_size from the shutil module one can easily determine the width of the terminal at runtime.
get_terminal_size
shutil
The following script wor