MemoryError when list append... plz help

BON alooha at live.co.kr
Wed Dec 31 01:02:49 EST 2008


======================
s=[]
for i in range(11000-1): 
    for j in range(i+1, 11000): 
        ....
        s.append(((i,j),sim)) 
======================
above sim is floating type.
s.append is totally coducted 60,494,500 times.
but this code raise MemoryError.

My computer has 4G RAM.
i think it's enough. but it doesn't...

So, i've tested below code.
======================
a=[] 
i=0 
while i<60494500 : 
    a.append(i) 
    i+=1
======================
but this code raise also MemoryError.

How can i resolve this problem?
please, help...

Regards,
-- 
View this message in context: http://www.nabble.com/MemoryError-when-list-append...-plz-help-tp21227745p21227745.html
Sent from the Python - python-list mailing list archive at Nabble.com.




More information about the Python-list mailing list