Check out the Python "zip" function. It has been a lifesaver to me when aggregating data like this.
On Apr 30, 9:33 pm, weheh <[email protected]> wrote: > From doc: > table=[['a','b'],['c','d']] > print TABLE(*[TR(*rows) for rows in table]) > > I want to change the color of the cells in the table according to > something like this, but I don't know how to say it. This is the best > I can come up with. Can someone offer a suggestion how to do this? > > colors=[['#FF0000','#00FF00'],['#0000FF','#FFFF00']] > print TABLE(*[TR(*rows for rows in table,_style="color: %s;" % *color) > for color in colors]) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. 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/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

