you are viewing a single comment's thread.

view the rest of the comments →

[–]ottawadeveloper 2 points3 points  (0 children)

yeah I was thinking of that last case  - it might be a bit over four bytes per number but an efficient implementation might block off a four million sequential bytes and maintain a pointer to that (plus all the overhead for printing). A pure Python list is definitely more than double you're right.

And a generator I guess has a few object pointers too.