Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Learning Python for Sage

Hi, I'm no expert in Python or Sage, but I want to learn Python specifically to help with Sage. I bought a book on Python programming and I'm trying out some of the stuff in Sage. But, some of it doesn't seem to work. So, I'm wondering... is this because Sage doesn't use Python 3 yet, or are there just some things with Python that don't work in Sage? If it's the second one, how can I know what's going to work and what's not? For example, in the book I have it says I should be able to do:

print("stuff stuff", end = " ")
print("stuff stuff")

and the effect is that instead of ending the print statement with "\n", it ends with a space so the second print statement prints on the same line. But, doing this in Sage 4.7 results in a syntax error, and it appears to not like the =.

Thanks