Elise Hellwig <echell...@gmail.com> writes: > 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. [using append]
As William pointed out, you can make a list all at once using lst = [None]*100 But 100 is not a large number, so you should just write the program in the most natural way, and worry about optimizing it only when necessary. For example, on my laptop I can append 100,000,000 integers to a list in 3.3 seconds. Dan -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org