Re: Jinja2 + jQuery tabs widget

2012-03-14 Thread JoeM
Disregard, apparently you can't include a {block} more than once in a Jinja2 template, which was causing the error. Cheers, Joed -- http://mail.python.org/mailman/listinfo/python-list

Extracting elements over multiple lists?

2011-11-07 Thread JoeM
Howdy, If I have a few lists like a=[1,2,3,4,5] b=["one", "two", "three", "four", "five"] c=["cat", "dog", "parrot", "clam", "ferret"] what is the most pythonic method of removing the first element from all of the lists? A list comprehension such as [arr[1:] for arr in a,b,c] gives a single 2d

Re: Extracting elements over multiple lists?

2011-11-07 Thread JoeM
Thanks guys, I was just looking for a one line solution instead of a for loop if possible. Why do you consider [x.remove(x[0]) for x in [a,b,c]] cheating? It seems compact and elegant enough for me. Cheers -- http://mail.python.org/mailman/listinfo/python-list