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
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
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