Ask Your Question

Revision history [back]

With such a huge range, you should get a MemoryError.

Instead of creating the whole list, you can use the xrange() iterator that generates the numbers one after another without storing them all.

That said, i only get the MemoryError, no crash: could you please give us some informations so that someone can try to reproduce your problem:

  • which version of Sage did you use ?
  • which OS ?
  • did you install Sage from the binaries, and which ones ?
  • did you compile Sage yourself ?
  • which notebook did you use (Sage notebook or jupyter notebook) ?
  • did you use the command line ?
  • which command did you type precisely to get the error ?
  • which error message did you get ?
  • ... ?