Tips for golfing in SageMath

3

1

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.

Mego

Posted 2016-09-08T08:54:00.760

Reputation: 32 998

Only 7 answers to date have used SageMath on PPCG, if anyone wants to have a look at them, they are listed here.

– seshoumara – 2016-09-08T10:25:20.223

No answers