2009/7/14 Carlos Córdoba <ccordob...@gmail.com>: > Thanks John, I'd seen Python comprehensions before, but since I was trying > to do all in a one-liner, I think I overlooked your elegant and simple > solution. One comprehension at a time is quite neat, but several is just > unreadable.
That could be a function of familiarity. Quick poll -- Do you find the following "just unreadable"? x = [1,2,3] y = [2*a for a in x] z = [b + 3 for b in y] w = [a/max(z) for a in z] v = [[cos(a), sin(a)] for a in w] ANSWER: [ ] Yes, the above is just unreadable. [ ] No, I can read the above just fine. It is crystal clear. -- William --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---