is there a way to do that in a fancy way in pure cython?
On Oct 26, 4:02 pm, Georg <[EMAIL PROTECTED]> wrote:
> Hi Roland,
>
> > 2. Is there a more elegant way for:
> > for k1 in range(-2,3):
> > for k2 in range(-2,3):
> > for k3 in range(-2,3):
> > for k4 in range(-2,3):
> > for k5 in range(-2,3):
> > for k6 in range(-2,3):
> > for k7 in range(-2,3): ?
>
> > Roland
>
> if you want to stay in pure python do this:
>
> Python 2.4.4 (#2, Apr 15 2008, 23:43:20)
> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.>>> for
> x in [(k1,k2) for k1 in range(-2,3) for k2 in range(-2,3)]:
>
> ... print x
>
> Georg
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---