SageMath is an open-source mathematics software system, built on Python 2. Its extensive math library support makes it a strong choice for golfing in math-based challenges.

What tips do you have for golfing in SageMath? One tip per answer, please. Tips should be specifically for SageMath, and not general golfing tips ("remove unnecessary whitespace"). Tips that apply to Python in general should go in the Python tips post.

  • \$\begingroup\$ Only 7 answers to date have used SageMath on PPCG, if anyone wants to have a look at them, they are listed here. \$\endgroup\$ – seshoumara Sep 8 '16 at 10:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.