JoeM wrote:
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
This is a one liner, but since you asked something *pythonic*, John's
solution is the best imo:
for arr in [a,b,c]:
arr.pop(0)
(Peter's "del" solution is quite close, but I find the 'del' statement
tricky in python and will mislead many python newcomers)
JM
--
http://mail.python.org/mailman/listinfo/python-list