The reason it takes so long is you are not using xrange
The range function iterates through the entire data set EVERY time,
regardless of whether it needs to
This increases processer use EXPONENTIALLY as that number gets larger.
I am not quite sure how xrange works, but it keeps only one number in memory
at any time
In fact, I never use range any more, I always use xrange.
ALL YOUR BASE ARE BELONG TO US
-----Original Message-----
From: python-list-bounces+burns.m atthew=verizon. net@python.org
[mailto:python-list-bounces+burns.m atthew=verizon. net@python.org] On Behalf
Of python-list-request@python. org
Sent: Tuesday, September 02, 2008 4:57 PM
To: python-list@python.org
Subject: Python-list Digest, Vol 60, Issue 30
Send Python-list mailing list submissions to
python-list@python.org
To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to
python-list-request@python. org
You can reach the person managing the list at
python-list-owner@python.or g
When replying, please edit your Subject line so it is more specific than
"Re: Contents of Python-list digest..."
The range function iterates through the entire data set EVERY time,
regardless of whether it needs to
This increases processer use EXPONENTIALLY as that number gets larger.
I am not quite sure how xrange works, but it keeps only one number in memory
at any time
In fact, I never use range any more, I always use xrange.
ALL YOUR BASE ARE BELONG TO US
-----Original Message-----
From: python-list-bounces+burns.m atthew=verizon. net@python.org
[mailto:python-list-bounces+burns.m atthew=verizon. net@python.org] On Behalf
Of python-list-request@python. org
Sent: Tuesday, September 02, 2008 4:57 PM
To: python-list@python.org
Subject: Python-list Digest, Vol 60, Issue 30
Send Python-list mailing list submissions to
python-list@python.org
To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to
python-list-request@python. org
You can reach the person managing the list at
python-list-owner@python.or g
When replying, please edit your Subject line so it is more specific than
"Re: Contents of Python-list digest..."