Is it possible to limit the number of lines output by a code cell in Google Colaboratory? As to mimic the behavior of the command shell that keeps only the last n lines?
Sometimes it happens that the browser crashes because of the size of the generated tab, due to the huge amount of text produced by debug text.
Is there a solution without having to reduce the amount of text actually generated by the code itself?