Yes, with t.timeit
the setup statement is executed only once and then the test statement multiple times. This means the list L
persists and grows every iteration, resulting obviously in your system running out of memory.
Try min(t.repeat(repeat=100, number=1))
to execute the setup each time before the evaluation of the test statement.
Here's the docs if you need more info.