In JupyterLab, I want to close the sys.stdout to avoid printing data, and then reopen the sys.stdout to allow printing.
Firstly, I use "sys.stdout = open(os.devnull, 'w')" to redirect the output flow. It worked in Jupyter. In Block 3, the output is not working.
However, in Block 4, I tried recover the sys.stdout, the output displays in Block 2. recover stdout
I want to show the output in Block 4.