Optimizing Memory Allocation in a Simple, but Long Function

Chris Angelico rosuav at gmail.com
Sun Apr 24 14:00:01 EDT 2016


On Mon, Apr 25, 2016 at 3:56 AM, Derek Klinge <schilke.60 at gmail.com> wrote:
> Doesn't range(n) create a list n long?

Not in Python 3. If your code is running on Python 2, use xrange
instead of range. I rather doubt that's your problem, though.

ChrisA



More information about the Python-list mailing list