> [[cos(a/9), sin(a/9)] for a in [b+3 for b in [2*c for c in [1,2,3]]]]
>
> (This is using a/9 instead of a/max(z) since I don't know how to do
> 'max(z)' in a one-liner like this.)
>

Thanks John, when I was talking about unreadable comprehensions I was
meaning this. i.e. nested ones. Then was when I thought it would be so much
easier and beautiful to just write 3 + (2 * [1,2,3]), but unfortunately it
seems not possible in regular python


> I think the above is not very readable, but of course you can write it
> as
>
> [[cos((2*a+3)/9), sin((2*a+3)/9)] for a in [1,2,3]]
>
> and it's not too bad.
>
>  John
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to