>i = 0 >s = 1000 * 'x' >mem = None >while 1: > i = i+1 > mem = (mem, s+`i`) > >might work (untested) >From the look of it, it will stop when approximately half the memory resource is used up, as the string needs to be copied to be enlarged.