how to solve memory

MRAB python at mrabarnett.plus.com
Fri Jun 10 20:33:54 EDT 2016


On 2016-06-11 00:31, meInvent bbird wrote:
> it is quite ridiculous,
> this time i am sure that i put correct indentation
> and add a else statement to make sure recursive call inside the
> if statement , it still memory error,
>
> where is the memory error?
>
> is itertools.combinations so big for the list?
>
[snip]

How long is initlist?

When I ran the code, it said over 100_000 items.

How many combinations would there be?

Over 10_000_000_000.

That's how long the list 'b' would be.

You'll need 10s of gigabytes of memory and a lot of patience!




More information about the Python-list mailing list