On 29 июл, 12:08, Roald de Vries <[email protected]> wrote: > First: list is a very unlucky name for a parameter, since it's the > type of [] > > Second: list comprehension rules! > > def groupListByRow(list): > return [lst[start:start+5] for start in range(0, len(lst), 5)] > > Cheers, Roald
Perfect!!!! This is why people use Python!!!! Simple, short, elegant Finally i will use Roald's solution. The transformation in template is possible, but not so clear. Thanks to all for their help. -- You received this message because you are subscribed to the Google Groups "Django users" 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/django-users?hl=en.

