First time here? Check out the FAQ!
answered 2020-02-27 18:03:32 +0100
You can declare a as a global variable:
a
def test2(): global a a=1 load("test.sage")
Remember that SageMath now is based on Python 3, so you should write print(a) if you use SageMath 9.0.
print(a)