> 1. I need to find the sum of all numbers at even positions in the > Fibonacci series upto 2 million. > > 2. I have used lists to achieve this.
I see. You may want to produce a "sequence" or "iterator" of fibonacci numbers rather than an explicit list. As it is, your machine does not have enough physical memory to hold the whole sequence at once. Python has a "generator" language feature that supports a style of programming on infinite sequences. You can find an introduction to Python generators here: http://linuxgazette.net/100/pramode.html _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor