| 1 | initial version |
Your Python syntax is indeed wrong. It should be
sage: A=[n^2+n+m^2 for n in [1..100] for m in [0..41]]
The "and" keyword is reserved for the binary operation.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.