Ask Your Question

Revision history [back]

You can do the following:

  • rename your file with the .sage extension, say my_file.sage
  • in this file, instead of just [1, 2, 3] you should give a name to your object, for example a=[1, 2, 3]
  • then, from your notebook, you can type load('/path/to/my_file.sage'), and you will be able to access the Python variable a.

You can do the following:

  • rename your file with the .sage extension, say say my_file.sage
  • in this file, instead of just [1, 2, 3] you should give a name to your object, for example a=[1, 2, 3]
  • then, from your notebook, you can type load('/path/to/my_file.sage'), and you will be able to access the Python variable a.