I have a list consisting of tuples, I want to pass each tuple\'s elements to a function as arguments:
mylist = [(a, b), (c, d), (e, f)]
myfunc(a, b)
myfunc(
To make @DSM's comment explicit:
>>> from itertools import starmap
>>> list(starmap(print, ((1,2), (3,4), (5,6))))
# 'list' is used here to force the generator to run out.
# You could instead just iterate like `for _ in starmap(...): pass`, etc.
1 2
3 4
5 6
[None, None, None] # the actual created list;
# `print` returns `None` after printing.