I am running a For loop as follows:
table = {};
For[n = 0, n < 10, n++, {table = Append[table, n], Print[table]}]
I was wondering if there was a convenient way to replace the display of the print in previous rounds of the for loop so that only the print associated with the latest round of the loop is displayed.
FYI: I know what I'm running is insanely trivial. It's merely a simple representation of the more complicated calculations I'm running in a for loop. Each calculation takes some non-negligible time, hence why I want to see the display before it's finished the loop, but I don't want to see all the previous iterations.
Thanks in advance for any help.
Monitor[i = 0; While[i < 100, Pause[0.1]; i++]; i, i]? – Andreas May 13 '21 at 08:55table = {}; Monitor[For[n = 0, n < 10, n++, {table = Append[table, n], Pause[0.2]}], table]– Andreas May 13 '21 at 09:15