0

In python project, if I have one for loop to append the data in one list, but it takes long time to finish such processing. How could I retrieve the processed list (not finished one) to transfer such list for other purpose? For example, in the following loop, how can I acquire the instant processed list c (not complete) for next processing process_steps2().

For a in list:
    b = process(a)
    c.append(b)
process_step2(c)
Thomas.Q
  • 377
  • 1
  • 4
  • 12
  • I am not sure to get it, you want to do batches with your list? https://stackoverflow.com/questions/8290397/how-to-split-an-iterable-in-constant-size-chunks – BlueSheepToken Nov 09 '18 at 08:48
  • Make checkpoints, where you export the temporary data, then continue the loop. How want you to start the new process? – Geeocode Nov 09 '18 at 08:56
  • Thx. Can you be more specific? The next process is just a save and demonstration function – Thomas.Q Nov 10 '18 at 13:06

0 Answers0