Memory pre-allocation for large lists

Erik Max Francis max at alcyone.com
Wed Feb 18 07:00:09 CET 2004


Avi Kak wrote:

> Can the same be done in Python?

Not directly, but you can just fill it with something you're not going
to use:

	arra = [None] * 999

-- 
 __ Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
/  \ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
\__/ Of war men ask the outcome, not the cause.
    -- Seneca



More information about the Python-list mailing list