Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I guess you could use raw_input()/input() (depending on Py2 versus Py3). If I understand your question correctly?

BUT you will have to be careful, because the raw input won't be preparsed (although you can ask for it to do that too, I guess). E.g. a file test.sage like this is bad:

a = raw_input()
print a^2


a = raw_input()
print Integer(a)^2

does more what one would expect.