This is actually very simple to do in Python, simply loop over the list and use the splat operator (*
) to unpack the tuple as arguments for the function:
mylist = [(a, b), (c, d), (e, f)]
for args in mylist:
myfunc(*args)
E.g:
>>> numbers = [(1, 2), (3, 4), (5, 6)]
>>> for args in numbers:
... print(*args)
...
1 2
3 4
5 6
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…