sage: v = [None]*1000

will create a list of length 1000.

On Fri, Jun 18, 2010 at 2:27 PM, Elise Hellwig <[email protected]> wrote:
> Hi,
>
> I am running version 4.4.2 (binary built) on snow leopard. I am trying
> a program to create a list of data from a file.  Right now the way
> Sage/Python is directing me to create this list is either type all the
> entries in myself (which I do not want to do because this is one of
> the reasons I am writing the program) or use append to add each piece
> of data.  Because I have over 100 pieces of data that need to go into
> this list, I'm worried about the memory it will take up.  I was
> wondering if there was a better way to create a list, like creating a
> list of N length and then simply adding pieces of data at various
> slots.  Thanks for the help!
>
> - Elise
>
> --
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to 
> [email protected]
> For more options, visit this group at 
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to