On 04/25/2008 05:00 AM, John Machin wrote:
On Apr 25, 5:44 pm, Robert Bossy <[EMAIL PROTECTED]> wrote:
If the OP insists in not examining a[0] and a[1], this will do exactly
the same as the while version:

for p in a[2:]:
    if p:
        print p

... at the cost of almost doubling the amount of memory required.

Yes, despite the asymptotic consumption of memory being the same, the practical one is also a concern. And in my original version of that loop (sketched in paper) was a for loop, but with C syntax.

--
Rogério Brito : [EMAIL PROTECTED],ime.usp}.br : GPG key 1024D/7C2CAEB8
http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito
Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to