Welcome to Geekdojo Sign in | Join | Help

Monday, August 07, 2006 - Posts

Preallocating list in python

I was looking for a way to preallocate a Boolean list in Python but didn't know a simple way.After googling I got the following:-# this would give us a 100 element list, each element initialized to Falseflags = [False] * 100'interesting' i thought but