How to iterate over [(1,2,3), (2,3,1), (1,1,1)]
while splitting each tuple into a head and a tail?
I am searching concise an pythonic way like this:
for h, *t in [(1,2,3), (2,3,1), (1,1,1)]:
# where I want t to be a tuple consisting of the last two elements
val = some_fun(h)
another_fun(val, t)
The above doesn't work for python 2.7.