On Oct 11, 10:50 pm, kcrisman <kcris...@gmail.com> wrote:

> It turns out that Python starts counting at zero.  So
>
> sage: range(3)
> [0, 1, 2]
>
> So this works.
>
> sage: for i in range(1,4):
>     e([i]).expand(3)
> ....:
> x0 + x1 + x2
> x0*x1 + x0*x2 + x1*x2
> x0*x1*x2
>
> For something a little more "Sage-ic", you could try
>
> sage: for i in [1..3]:
>     e([i]).expand(3)
> ....:
> x0 + x1 + x2
> x0*x1 + x0*x2 + x1*x2
> x0*x1*x2
>
> This uses Sage Integers instead of Python ints.
> fixed recently)?
>

Many thanks for the very speedy diagnosis! I'm glad to have such an
easy solution.

Thanks again,

James Parson

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to